ID: 30973
User updated by: alberty at neptunelabs dot com
Reported By: alberty at neptunelabs dot com
-Status: Open
+Status: Closed
Bug Type: cURL related
Operating System: linux_i686
PHP Version: 4.3.9
New Comment:
Okay, i've seen that's fixed in 4.3.10
Previous Comments:
------------------------------------------------------------------------
[2004-12-03 10:46:54] alberty at neptunelabs dot com
Description:
------------
If you get a wrong url and get the content type via curl_getinfo($ch,
CURLINFO_CONTENT_TYPE); the cURL extention crashes with a segfault.
patch:
1213c1213,1215
< RETURN_STRING(s_code, 1);
---
> if (s_code){
> RETURN_STRING(s_code, 1);
> }
Regards,
Steve
Reproduce code:
---------------
<?php
$ch = curl_init ('http://www.totallywrongdomain.com/');
if ($ch){
$result=curl_exec ($ch);
$returnvalue['content_type']=curl_getinfo($ch,
CURLINFO_CONTENT_TYPE);
curl_close ($ch);
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30973&edit=1