[wp-trac] [WordPress Trac] #41889: Missing Break Statement In class-pclzip php file

WordPress Trac noreply at wordpress.org
Sun Sep 17 23:08:20 UTC 2017


#41889: Missing Break Statement In class-pclzip php file
-----------------------------------+----------------------
 Reporter:  adnan.limdi            |       Owner:
     Type:  defect (bug)           |      Status:  closed
 Priority:  low                    |   Milestone:
Component:  Filesystem API         |     Version:
 Severity:  normal                 |  Resolution:  invalid
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+----------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 This looks to be intentional to me.

 `PCLZIP_OPT_BY_EREG` is deprecated, so it overwrites `PCLZIP_OPT_BY_EREG`
 with `PCLZIP_OPT_BY_PREG` in the args array, and then performs the
 validation for the parameters for `..PREG` which is what now happens when
 you use `..EREG`

 Code in question with more context:
 https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-
 pclzip.php?marks=1566-1579#L1558

 It's also worth noting, that `PclZip` is not a WordPress library, it's
 home is over at http://www.phpconcept.net/pclzip and bugs in it can be
 reported directly to the author. Over the years we've made some updates to
 the library for PHP compatibility, but that's it.

 Unless this is causing a PHP Warning or related message or an actual bug,
 I'm marking this as invalid. A warning from a code sniffer or similar tool
 isn't enough of a reason to change it IMHO.

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


More information about the wp-trac mailing list