php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26312 bug in raiseError in DB/common.php
Submitted: 2003-11-19 05:37 UTC Modified: 2003-11-19 09:43 UTC
From: wilfrid at digifactory dot fr Assigned:
Status: Not a bug Package: *Database Functions
PHP Version: 5.0.0b2 (beta2) OS: redhat 9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wilfrid at digifactory dot fr
New email:
PHP Version: OS:

 

 [2003-11-19 05:37 UTC] wilfrid at digifactory dot fr
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);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-19 09:43 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is a PEAR bug, please report it on the PEAR bug system at: http://pear.php.net/bugs/
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC