#40682 [NEW]: set_error_handler doesn't respect @ operator

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

  1. #1

    Default #40682 [NEW]: set_error_handler doesn't respect @ operator

    From: quintenbernaert at gmail dot com
    Operating system: Linux
    PHP version: 4.4.6
    PHP Bug Type: Scripting Engine problem
    Bug description: set_error_handler doesn't respect @ operator

    Description:
    ------------
    set_error_handler doesn't respect the @ operator and it should respect it.
    The @ does ignore errors of that function. set_error_handler report errors.
    But if I put an @ before a function, set_error_handler still show the error
    and it shouldn't show it.

    Reproduce code:
    ---------------
    <?php
    function errors($errno, $errstr, $errfile, $errline)
    {
    echo 'Error handler<br /><br />

    '.$errno.'<br />
    '.$errstr.'<br />
    '.$errfile.'<br />
    '.$errline.'<br />';
    }

    set_error_handler("errors");

    @getimagesize();
    ?>

    Expected result:
    ----------------
    Empty page.

    Actual result:
    --------------
    Error handler

    2
    Wrong parameter count for getimagesize()
    /home/quinten/www/problem_errorhandler.php
    14

    --
    Edit bug report at [url]http://bugs.php.net/?id=40682&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40682&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40682&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40682&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40682&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40682&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40682&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40682&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40682&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40682&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40682&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40682&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40682&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40682&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40682&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40682&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40682&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40682&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40682&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40682&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40682&r=mysqlcfg[/url]
    quintenbernaert at gmail dot com Guest

  2. Similar Questions and Discussions

    1. #40684 [NEW]: about set_error_handler bug
      From: dq2 at compass dot jp Operating system: windowsxp PHP version: 4.4.6 PHP Bug Type: *General Issues Bug description: ...
    2. what's better: yon or removefromworld with respect toprocessing power
      hello; any model that is beyond yon does not get rendered; and any model that has been removefromworld() does not get rendered; are there any...
    3. #25887 [NEW]: session.save_path should respect open_basedir
      From: john at scl dot co dot uk Operating system: linux PHP version: 4.3.3 PHP Bug Type: Feature/Change Request Bug...
    4. set_error_handler() and @ error control operator
      Hi. I mentioned this before, but I think my question got kind of lost. I'll make it one short question now. With...
    5. Finder windows don't respect the dock, hard drive keeps moving
      I have an original eMac with jaguar and updates current to about a week ago. I've had the continuing problem of the finder opening windows that...
  3. #2

    Default #40682 [Opn->Bgs]: set_error_handler doesn't respect @ operator

    ID: 40682
    Updated by: [email]tony2001@php.net[/email]
    Reported By: quintenbernaert at gmail dot com
    -Status: Open
    +Status: Bogus
    Bug Type: Scripting Engine problem
    Operating System: Linux
    PHP Version: 4.4.6
    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-03-01 16:59:03] quintenbernaert at gmail dot com

    Description:
    ------------
    set_error_handler doesn't respect the @ operator and it should respect
    it. The @ does ignore errors of that function. set_error_handler report
    errors. But if I put an @ before a function, set_error_handler still
    show the error and it shouldn't show it.

    Reproduce code:
    ---------------
    <?php
    function errors($errno, $errstr, $errfile, $errline)
    {
    echo 'Error handler<br /><br />

    '.$errno.'<br />
    '.$errstr.'<br />
    '.$errfile.'<br />
    '.$errline.'<br />';
    }

    set_error_handler("errors");

    @getimagesize();
    ?>

    Expected result:
    ----------------
    Empty page.

    Actual result:
    --------------
    Error handler

    2
    Wrong parameter count for getimagesize()
    /home/quinten/www/problem_errorhandler.php
    14


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


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40682&edit=1[/url]
    tony2001@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