From: dba at csis dot dk Operating system: Windows XP SP3 PHP version: 6CVS-2009-04-14 (snap) PHP Bug Type: cURL related Bug description: array Notice: Undefined index:
Description: ------------ can't call array from $curl_getinfo['xxx'] but will output on var_dump() and var_export() --- phpinfo() System Windows NT DBA-XP-UK 5.1 build 2600 (Windows XP Professional Service Pack 3) i586 Build Date Apr 14 2009 00:27:29 Compiler MSVC6 (Visual C++ 6.0) Server API Apache 2.0 Handler Apache Version Apache/2.2.11 (Win32) PHP/6.0.0-dev Reproduce code: --------------- <?php error_reporting (E_ALL); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.php.net/"); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $curl_data = curl_exec($ch); $curl_getinfo = curl_getinfo($ch); print "<pre>".var_export($curl_getinfo, true)."</pre>"; print "curl_getinfo['url']: ".$curl_getinfo['url']."<br>"; // Notice: Undefined index: url in D:\home\main\tools\test\index.php on line 19 curl_close($ch); ?> Expected result: ---------------- output from var_export($curl_getinfo) AND output from print $curl_getinfo['url'] Actual result: -------------- only gets output from var_export($curl_getinfo)... -- Edit bug report at http://bugs.php.net/?id=47966&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47966&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47966&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47966&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47966&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47966&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47966&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47966&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47966&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47966&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47966&r=support Expected behavior: http://bugs.php.net/fix.php?id=47966&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47966&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47966&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47966&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47966&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47966&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47966&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47966&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47966&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47966&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47966&r=mysqlcfg