Ask a Question related to PHP Bugs, Design and Development.
-
mathiasrav at gmail dot com #1
#40587 [NEW]: Attempt to call undefined function gives a fatal error instead of recoverable
From: mathiasrav at gmail dot com
Operating system: WinXP
PHP version: 5.2.1
PHP Bug Type: Feature/Change Request
Bug description: Attempt to call undefined function gives a fatal error instead of recoverable
Description:
------------
If you try to call an undefined function, PHP raises an E_ERROR and
crashes - not a catchable E_RECOVERABLE_ERROR.
This isn't a problem for web-related scripts, but for
maintainence/shell-like scripts, this can be a help. I have a script with
an idle-loop that calls (includes) module-files, and if a change to one of
these has a typo, all socket connections and the like are killed.
Reproduce code:
---------------
<?php
function returntrue(){return true;}
seterrorhandler('returntrue', E_RECOVERABLE_ERROR);
qweasd();
echo 'Carrying on...';
?>
Expected result:
----------------
The call to qweasd() should return false or null. If the programmer has
made the script able to recover from calls to unknown functions, he must
have written code that can tell the difference between the return code
from a known and an unknown function.
Actual result:
--------------
The script halts.
--
Edit bug report at [url]http://bugs.php.net/?id=40587&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40587&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40587&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40587&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40587&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40587&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40587&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40587&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40587&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40587&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40587&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40587&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40587&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40587&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40587&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40587&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40587&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40587&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40587&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40587&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40587&r=mysqlcfg[/url]
mathiasrav at gmail dot com Guest
-
Fatal error: Call to undefined function
I'm a PHP and MySQL newbie. I have a feeling a lot of you may have seen this before. I'm teaching myself PHP/MySQL and trying to setup a guestbook.... -
Fatal error: Call to undefined function: mime_content_type()
Does mime_content_type() require anything to be pre-compiled? I'm using PHP4.3.3 with Apache 1.3.28 and the man/help page in the latest php.chm... -
Fatal error: Call to undefined function: imagecreatefromjpeg() in...
I am getting a "Fatal error: Call to undefined function: imagecreatefromjpeg() in..." error in one of my scripts, and after doing a bit of... -
Fatal error: Call to undefined function: imagecreatefromjpeg()
Folks, I feel like pulling my hair out - I tried unsuccessfully over the past few days to install ImagMagick but because of version conflicts and... -
Fatal error: Call to undefined function: mysql_connect()
I get this error "Fatal error: Call to undefined function: mysql_connect() " in one script. whereas phpMyAdmin is installed in another directory and... -
mathiasrav at gmail dot com #2
#40587 [Opn]: Attempt to call undefined function gives a fatal error instead of recoverable
ID: 40587
User updated by: mathiasrav at gmail dot com
Reported By: mathiasrav at gmail dot com
Status: Open
Bug Type: Feature/Change Request
Operating System: WinXP
PHP Version: 5.2.1
New Comment:
A little change to the description-section - PHP doesn't crash, it
simply halts script execution. The *script* "crashes".
Previous Comments:
------------------------------------------------------------------------
[2007-02-21 23:03:16] mathiasrav at gmail dot com
Description:
------------
If you try to call an undefined function, PHP raises an E_ERROR and
crashes - not a catchable E_RECOVERABLE_ERROR.
This isn't a problem for web-related scripts, but for
maintainence/shell-like scripts, this can be a help. I have a script
with an idle-loop that calls (includes) module-files, and if a change
to one of these has a typo, all socket connections and the like are
killed.
Reproduce code:
---------------
<?php
function returntrue(){return true;}
seterrorhandler('returntrue', E_RECOVERABLE_ERROR);
qweasd();
echo 'Carrying on...';
?>
Expected result:
----------------
The call to qweasd() should return false or null. If the programmer has
made the script able to recover from calls to unknown functions, he must
have written code that can tell the difference between the return code
from a known and an unknown function.
Actual result:
--------------
The script halts.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40587&edit=1[/url]
mathiasrav at gmail dot com Guest
-
derick@php.net #3
#40587 [Opn->Bgs]: Attempt to call undefined function gives a fatal error instead of recoverable
ID: 40587
Updated by: [email]derick@php.net[/email]
Reported By: mathiasrav at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: WinXP
PHP Version: 5.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
[url]http://www.php.net/manual/[/url] and the instructions on how to report
a bug at [url]http://bugs.php.net/how-to-report.php[/url]
..
Previous Comments:
------------------------------------------------------------------------
[2007-02-21 23:06:37] mathiasrav at gmail dot com
A little change to the description-section - PHP doesn't crash, it
simply halts script execution. The *script* "crashes".
------------------------------------------------------------------------
[2007-02-21 23:03:16] mathiasrav at gmail dot com
Description:
------------
If you try to call an undefined function, PHP raises an E_ERROR and
crashes - not a catchable E_RECOVERABLE_ERROR.
This isn't a problem for web-related scripts, but for
maintainence/shell-like scripts, this can be a help. I have a script
with an idle-loop that calls (includes) module-files, and if a change
to one of these has a typo, all socket connections and the like are
killed.
Reproduce code:
---------------
<?php
function returntrue(){return true;}
seterrorhandler('returntrue', E_RECOVERABLE_ERROR);
qweasd();
echo 'Carrying on...';
?>
Expected result:
----------------
The call to qweasd() should return false or null. If the programmer has
made the script able to recover from calls to unknown functions, he must
have written code that can tell the difference between the return code
from a known and an unknown function.
Actual result:
--------------
The script halts.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40587&edit=1[/url]
derick@php.net Guest



Reply With Quote

