[wp-trac] [WordPress Trac] #49889: Image.php - Wrap Error Suppressors in WP_DEBUG Conditionals

WordPress Trac noreply at wordpress.org
Tue Jan 26 17:35:02 UTC 2021


#49889: Image.php - Wrap Error Suppressors in WP_DEBUG Conditionals
-------------------------------------------------+-------------------------
 Reporter:  Howdy_McGee                          |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.7
Component:  Media                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-dev-note needs-      |     Focuses:  coding-
  unit-tests                                     |  standards
-------------------------------------------------+-------------------------

Comment (by hellofromTonya):

 Capturing PHP 8 notes from conversation with @jrf. She has reviewed the
 `@` suppression for `getimagesize()`:

 >Ok, I've just had a look.
 >References:
 > -
 https://www.php.net/manual/en/function.getimagesize.php#refsect1-function
 .getimagesize-errors
 > - https://wiki.php.net/rfc/engine_warnings#proposed_classification
 >At first glance, this error suppression operator looks to be justified
 and will not cause any PHP 8 issues, though I'd recommend doing some
 testing with 3v4l or another tool to verify.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49889#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list