ID:               29588
 User updated by:  tony at marston-home dot demon dot co dot uk
 Reported By:      tony at marston-home dot demon dot co dot uk
-Status:           Feedback
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: WindowsXP
 PHP Version:      5.0.0
 New Comment:

Yes, that works now.


Previous Comments:
------------------------------------------------------------------------

[2005-02-28 21:23:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2004-08-09 17:24:10] tony at marston-home dot demon dot co dot uk

Description:
------------
I have a class called 'mysql' which deals with all MySQL function
calls. It contains the following code:

$result = mysqli_query($link, $query) or trigger_error("SQL",
E_USER_ERROR);

In the event of a fatal error it calls my custom error handler which
accesses all 5 arguments ($errno, $errstr, $errfile, $errline,
$errcontext).

With PHP 4 $errcontext contains the following:
Array
(
    [this] => mysql Object
        (
            ... class variables appear here ...  
        )

    [dbname] => sample
    [tablename] => pers_opt_xref
    [where] => ...
    [result] => 
)

With PHP 5 the same error produces the following:
Array
(
    [dbname] => sample
    [tablename] => pers_opt_xref
    [where] => ...  
    [result] => 
)

You will note that the object references are completely missing. This
is preventing me from determining that the error came from my 'mysql'
object and therefore obtaining the current values for mysql_errno() and
mysql_error().

Expected result:
----------------
If the error is triggered from within an object I expect $errcontext to
contain an object reference as stated in the manual at
http://www.php.net/manual/en/function.set-error-handler.php

Actual result:
--------------
If triggered from within an object $errcontext does not contain any
object references.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29588&edit=1

Reply via email to