Skip to content

CurlHttpClient crashes with Undefined variable: active #32833

@melkamar

Description

@melkamar

Symfony version(s) affected: 4.3.3 (this does not happen in 4.3.2)

Description

Freshly updated to 4.3.3 and my tests started crashing with notice Undefined variable: active.

Turns out the issue is in this line which was added recently.

If I declare $active=NULL; before passing it to curl_multi_exec(), the notice goes away.

Now, even PHP documentation uses a code example where the $active variable is undefined when passed into the function. Based on some more reading I believe that PHP should not raise a notice when an undefined variable is being passed into a function as a reference, but that is for some reason happening to me.

How to reproduce

  • Set up PHPUnit with convertNoticesToExceptions = "true"
  • Run PHPUnit KernelTestCase, execute a request and invoke KernelTestCase::ensureKernelShutdown().

Possible Solution

Initialize the $active variable before passing in to a function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy