#52179 closed defect (bug) (duplicate)
Update theme---class-pclzip fatal error with PHP 8.0
Reported by: | 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)
Note: See
TracTickets for help on using
tickets.
The problem is solved. Use github code
https://github.com/WordPress/wordpress-develop/pull/817/commits/1ab4969bbdf3d8d173fe8ff28c515cbee019895e