Bug #76559 [Opn->Fbk]: curl_*() fail to fall back to global namespace if called from within a namespac
Edit report at https://bugs.php.net/bug.php?id=76559&edit=1
ID: 76559
Updated by: danack@php.net
Reported by: teo8976 at gmail dot com
Summary: curl_*() fail to fall back to global namespace if
called from within a namespac
-Status: Open
+Status: Feedback
Type: Bug
Package: cURL related
Operating System: debian
PHP Version: 5.6.36
Block user comment: N
Private report: N
New Comment:
Please can you check you have curl installed.
I can't reproduce your issue, except when curl is not installed.
Previous Comments:
------------------------------------------------------------------------
[2018-07-01 15:13:21] teo8976 at gmail dot com
Description:
------------
When you call curl_init() or any other curl_xxx() function from within a namespace, without
prepending a "\" (which you are not supposed to have to do), you get this stupid error:
Call to undefined function Whatever\\The\\Current\\NameSpace\\Is\\curl_init()
Test script:
---------------
namespace TestNameSpace;
class TestClass {
function testMethod() {
curl_init();
echo "OK";
}
}
$t=new TestClass();
$t->testMethod();
Expected result:
----------------
OK
Actual result:
--------------
Call to undefined function TestNameSpace\\curl_reset()
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76559&edit=1
Thread (7 messages)