Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52179 closed defect (bug) (duplicate)

Update theme---class-pclzip fatal error with PHP 8.0

Reported by: liuzhuahui's profile liuzhuahui Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.6
Component: Filesystem API Keywords:
Focuses: Cc:

Description

2020/12/27 11:35:54 [error] 27366#27366: *2308 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ValueError: fread(): Argument #2 ($length) must be greater than 0 in /wp-admin/includes/class-pclzip.php:4212 
Stack trace: 
#0 /wp-admin/includes/class-pclzip.php(4212): fread(Resource id #108, 0) 
#1 /wp-admin/includes/class-pclzip.php(3518): PclZip->privExtractFileAsString(Array, '', Array) 
#2 /wp-admin/includes/class-pclzip.php(811): PclZip->privExtractByRule(Array, './', '', false, Array) 
#3 /wp-admin/includes/file.php(1639): PclZip->extract(77006) 
#4 /wp-admin/includes/file.php(1476): _unzip_file_pclzip('/tmp/bb.1....', '/usr/share/ngin...', Array) 
#5 /wp-admin/includes/class-wp-upgrader.php(328): unzip_file('/tmp/bb.1....', '/usr/share/ngin...') 
#6 /wp-admin/includes/class-wp-upgrader.php(779): WP_Upgrader->unpack_package('/tmp/bb.1" while reading upstream, , server: xxx.com, request: "GET /wp-admin/update.php?action=update-selected-themes&themes=bb&_wpnonce=4cf1c925d2 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm.sock:", host: "xxx.com", referrer: "https://xxx.com/wp-admin/update-core.php?action=do-theme-upgrade" 
2020/12/27 11:46:24 [error] 1065#1065: *2352 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ValueError: fread(): Argument #2 ($length) must be greater than 0 in /wp-admin/includes/class-pclzip.php:4212 
Stack trace: 
#0 /wp-admin/includes/class-pclzip.php(4212): fread(Resource id #109, 0) 
#1 /wp-admin/includes/class-pclzip.php(3518): PclZip->privExtractFileAsString(Array, '', Array) 
#2 /wp-admin/includes/class-pclzip.php(811): PclZip->privExtractByRule(Array, './', '', false, Array) 
#3 /wp-admin/includes/file.php(1639): PclZip->extract(77006) 
#4 /wp-admin/includes/file.php(1476): _unzip_file_pclzip('/tmp/bb-co...', '/usr/share/ngin...', Array) 
#5 /wp-admin/includes/class-wp-upgrader.php(328): unzip_file('/tmp/bb-co...', '/usr/share/ngin...') 
#6 /wp-admin/includes/class-wp-upgrader.php(779): WP_Upgrader->unpack_package('/tmp/bb-co" while reading upstream, , server: xxx.com, request: "GET /wp-admin/update.php?action=update-selected&plugins=bb-companion%2Fblocksy-companion.php&_wpnonce=7568c7759c HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm.sock:", host: "xxx.com", referrer: "https://xxx.com/wp-admin/update-core.php?action=do-plugin-upgrade" 

Change History (4)

#2 @ayeshrajans
4 years ago

  • Keywords php8 added

#3 @jrf
4 years ago

  • Keywords needs-patch php8 removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

@liuzhuahui Thanks for reporting this and for testing the patch in GH PR #817. Very glad to hear that patch solves the issue.

I'm closing this issue now in favour of the original report in #52018.

#4 @SergeyBiryukov
4 years ago

  • Component changed from General to Filesystem API
Note: See TracTickets for help on using tickets.