From:             wilfrid at digifactory dot fr
Operating system: redhat 9
PHP version:      5.0.0b2 (beta2)
PHP Bug Type:     *Database Functions
Bug description:  bug in raiseError in DB/common.php

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);


-- 
Edit bug report at http://bugs.php.net/?id=26312&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26312&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26312&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26312&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26312&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26312&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26312&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26312&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26312&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26312&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26312&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26312&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26312&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26312&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26312&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26312&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26312&r=float

Reply via email to