#40587 [NEW]: Attempt to call undefined function gives a fatal error instead of recoverable

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #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

  2. Similar Questions and Discussions

    1. 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....
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default #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

  4. #3

    Default #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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139