ID:               31542
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jcmailtrap-php at yahoo dot ca
 Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: RHEL3
 PHP Version:      5.0.3
 New Comment:

Don't all E_ERRORs do this?


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

[2005-01-13 18:14:34] jcmailtrap-php at yahoo dot ca

Description:
------------
When a fatal error is caused by attempting to call a method on an
non-object or non-existing variable, eval() throws a fatal error which
terminates the script instead of returning false as stated in the doc.

Reproduce code:
---------------
$result = eval('$nosuchobject->method();');
echo "done eval\n";
if ($result===false) {
    echo "error correctly returned\n";
}


Expected result:
----------------
Notice: Undefined variable: nosuchobject 
Fatal error: Call to a member function method() on a non-object

done eval
error correctly returned


Actual result:
--------------
Notice: Undefined variable: nosuchobject 
Fatal error: Call to a member function method() on a non-object



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


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

Reply via email to