|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2003-11-19 09:43 UTC] iliaa@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 19:00:02 2025 UTC | 
Description: ------------ In the standard include DB/common.php (/usr/local/lib/php) there is a bug on the raiseError function : Fatal error: Only variables or references can be returned by reference in /usr/local/lib/php/DB/common.php on line 298 At this line, there is this : return PEAR::raiseError(null, $code, $mode, $options, $userinfo,'DB_Error', true); I don't know what is the problem (i'm just transfering severals website on a new server using php5), but the website have no problem on the previous server using php4... Reproduce code: --------------- function &raiseError($code = DB_ERROR, $mode = null, $options = null, $userinfo = null, $nativecode = null) { // The error is yet a DB error object if (is_object($code)) { // because we the static PEAR::raiseError, our global // handler should be used if it is set if ($mode === null && !empty($this->_default_error_mode)) { $mode = $this->_default_error_mode; $options = $this->_default_error_options; } return PEAR::raiseError($code, null, $mode, $options, null, null, true); } if ($userinfo === null) { $userinfo = $this->last_query; } if ($nativecode) { $userinfo .= " [nativecode=$nativecode]"; } return PEAR::raiseError(null, $code, $mode, $options, $userinfo, 'DB_Error', true); } Actual result: -------------- return PEAR::raiseError(null, $code, $mode, $options, $userinfo,'DB_Error', true);