[wp-trac] [WordPress Trac] #24780: Use error handlers rather than the error suppression operator

WordPress Trac noreply at wordpress.org
Wed Jul 17 01:14:56 UTC 2013


#24780: Use error handlers rather than the error suppression operator
--------------------------+----------------------------
 Reporter:  rmccue        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Filesystem    |    Version:
 Severity:  normal        |   Keywords:
--------------------------+----------------------------
 In various places in core (and included libraries, such as pclzip, FTP and
 phpass), the error suppression operator is used to suppress warnings and
 notices. However, this also suppresses fatal errors, which makes it a huge
 pain for debugging.

 The big one here is `fopen`, where it is used to suppress warnings when
 opening a handle fails. For normal files, this is fine since the only
 errors generated are warnings. When using streams and custom stream
 handlers, these can generate errors which are really hard to find with
 this.

 (I ran into this with the App Engine plugin, where the SDK method
 generates a fatal error if the mode is `a`, which is used with error
 suppression in `win_is_writable()`.)

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24780>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list