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

WordPress Trac noreply at wordpress.org
Thu Apr 2 02:07:14 UTC 2020


#24780: Use error handlers rather than the error suppression operator
----------------------------+---------------------
 Reporter:  rmccue          |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:
Component:  Filesystem API  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:
----------------------------+---------------------

Comment (by SergeyBiryukov):

 Replying to [comment:6 Howdy_McGee]:
 > Doing a quick search on this, there are at least **~200 instances** of
 the @ suppression operator **across ~55 files**. Maybe to make this
 process easier we should split it up (by ticket) into smaller bites either
 by component or file. Most files have less 1 or 2 instances but the
 `class-pclzip.php` file has around 60 instances.

 Thanks for the research! I think it would make sense to split this into
 smaller tickets per file or a group of related files.

 These files were previously external libraries:
 {{{
 wp-admin/includes/class-ftp-pure.php
 wp-admin/includes/class-ftp-sockets.php
 wp-admin/includes/class-ftp.php
 wp-admin/includes/class-pclzip.php
 wp-includes/IXR/*
 wp-includes/class-phpass.php
 }}}
 With the upstream sources seemingly abandoned, they are now treated as
 "adopted" rather than external, per comment:1:ticket:49163 and
 comment:2:ticket:48267. That said, I think we should still minimize
 changes to them and probably exclude them from the first pass. So far,
 they only received some necessary changes like [32990] / #31982, or minor
 typo fixes like [47123] / #49163.

 These are supported external libraries that should definitely be excluded
 from any changes here:
 {{{
 wp-includes/ID3/*
 wp-includes/random_compat/*
 wp-includes/SimplePie/*
 wp-includes/class-phpmailer.php
 wp-includes/class-pop3.php
 wp-includes/class-requests.php
 wp-includes/class-smtp.php
 }}}

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


More information about the wp-trac mailing list