#47966 [Opn->Ver]: array Notice: Undefined index:
| From: | pajoye@php.net | Date: | Sun, 03 May 2009 21:01:19 +0000 |
| Subject: | #47966 [Opn->Ver]: array Notice: Undefined index: | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136689@lists.php.net to get a copy of this message | ||
ID: 47966
Updated by: pajoye@php.net
Reported By: dba at csis dot dk
-Status: Open
+Status: Verified
Bug Type: cURL related
-Operating System: Windows XP SP3
+Operating System: *
PHP Version: 6CVS-2009-04-14 (snap)
New Comment:
All OSes.
Note that b"url" works, but even using add_assoc_string or
add_assoc_utf8_string does not help. See the CAAS macro in interface.c
Previous Comments:
------------------------------------------------------------------------
[2009-04-14 11:25:41] dba at csis dot dk
correction on commented line 14:
// Notice: Undefined index: url in D:\home\main\tools\test\index.php
on line 14
------------------------------------------------------------------------
[2009-04-14 11:23:20] dba at csis dot dk
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 this bug report at http://bugs.php.net/?id=47966&edit=1