Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#17224 closed defect (bug) (fixed)

Incorrect handling of PclZip's errors

Reported by: dd32 Owned by:
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords:
Focuses: Cc:


PclZip::extract() returns an array or 0 on failure, the latest docs avaialable here: http://www.phpconcept.net/pclzip/user-guide/55 spell that out clearly.

Currently in core we check for (bool)false only, resulting in a few PHP Notices and unneeded processing of some code.

Solution here is to change it to !is_array(), as anything other than an array is going to be a failure.

Change History (1)

#1 @dd32
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [17693]) Handle zip error's in PclZip better. PclZip::extract() returns an array on success, 0 on failure. Fixes #17224

Note: See TracTickets for help on using tickets.