PHP 4.0 Bug #8408 Updated: example given raises php4 warning about use of &$errno and &$errstr

From: Date: Sun, 14 Jan 2001 01:22:13 +0000
Subject: PHP 4.0 Bug #8408 Updated: example given raises php4 warning about use of &$errno and &$errstr
Groups: php.dev 
Request: Send a blank email to php-dev+get-44021@lists.php.net to get a copy of this message
ID: 8408 Updated by: sniper Reported By: alan@frostick.de Old-Status: Duplicate Status: Bogus Bug Type: Documentation problem Assigned To: Comments: Just cleaning up bug database. This one is duplicate of #8406. (which is closed) Previous Comments: --------------------------------------------------------------------------- [2000-12-24 18:34:40] chrisv@php.net same as #8406. --------------------------------------------------------------------------- [2000-12-24 12:23:28] alan@frostick.de The above error message can be eliminated by removing the ampersands. $fp = fsockopen("www.php.net", 80, $errno, $errstr, 30); thus. --------------------------------------------------------------------------- [2000-12-24 12:20:59] alan@frostick.de 1 2 $fp = fsockopen("www.php.net", 80, &$errno, &$errstr, 30); 3 if(!$fp) { 4 echo "$errstr ($errno)<br>n"; 5 } else { 6 fputs($fp,"GET / HTTP/1.0nn"); 7 while(!feof($fp)) { 8 echo fgets($fp,128); 9 } 10 fclose($fp); 11 } 12 Message resulted: Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in c:datainternetkernelimportsocket.php3 on line 2 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8408

« previous php.dev (#44021) next »