wp-checksum icon indicating copy to clipboard operation
wp-checksum copied to clipboard

PHP Fatal Error

Open Lindstromer opened this issue 5 years ago • 3 comments

Seems like there's an issue, that I'm guessing is related to PHP 7.3. It gives a fatal error:

Checksum diff for plugin autoptimize readme.txt

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /www/website.com/vendor/eriktorsner/wp-checksum/src/ApiClient.php:277
Stack trace:
#0 /www/website.com/vendor/eriktorsner/wp-checksum/src/ApiClient.php(226): WPChecksum\ApiClient->getApiKey()
#1 /www/website.com/vendor/eriktorsner/wp-checksum/src/FileDiff.php(135): WPChecksum\ApiClient->getFile('plugin', 'autoptimize', '2.5.1', 'readme.txt')
#2 /www/website.com/vendor/eriktorsner/wp-checksum/src/FileDiff.php(44): WPChecksum\FileDiff->getPluginFiles('autoptimize', 'readme.txt')
#3 /www/website.com/vendor/eriktorsner/wp-checksum/src/Checksum.php(355): WPChecksum\FileDiff->getDiff('plugin', 'autoptimize', 'readme.txt', 'diff')
#4 [internal function]: WPChecksum\Checksum->diff(Array, Array)
#5 phar:///usr/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php(67): call_user_func(Array, Array, Array)
#6 [internal function]: WP_CLI\Dispatcher\CommandFactory in /www/website.com/vendor/eriktorsner/wp-checksum/src/ApiClient.php on line 277
Error: Webbplatsen har tekniska problem.
Process completed with status 255

Gave it a quick check and I can get it running with the same repos (tried on multiple sites) when doing it with PHP 7.1 locally.

Lindstromer avatar Oct 30 '19 12:10 Lindstromer

Hörde att det ger samma fel i PHP 7.1 för en annan person så det är nog knappast PHP-versionen isf.

Lindstromer avatar Oct 30 '19 12:10 Lindstromer

Thanks for the report Olaf. I will troubleshoot asap.

--

/Erik Torsner Tel: 0733-118503

On 30 Oct 2019, 13:02 +0100, Olaf Lindström [email protected], wrote:

Seems like there's an issue, that I'm guessing is related to PHP 7.3. It gives a fatal error: Checksum diff for plugin autoptimize readme.txt

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /www/website.com/vendor/eriktorsner/wp-checksum/src/ApiClient.php:277 Stack trace: #0 /www/website.com/vendor/eriktorsner/wp-checksum/src/ApiClient.php(226): WPChecksum\ApiClient->getApiKey() #1 /www/website.com/vendor/eriktorsner/wp-checksum/src/FileDiff.php(135): WPChecksum\ApiClient->getFile('plugin', 'autoptimize', '2.5.1', 'readme.txt') #2 /www/website.com/vendor/eriktorsner/wp-checksum/src/FileDiff.php(44): WPChecksum\FileDiff->getPluginFiles('autoptimize', 'readme.txt') #3 /www/website.com/vendor/eriktorsner/wp-checksum/src/Checksum.php(355): WPChecksum\FileDiff->getDiff('plugin', 'autoptimize', 'readme.txt', 'diff') #4 [internal function]: WPChecksum\Checksum->diff(Array, Array) #5 phar:///usr/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php(67): call_user_func(Array, Array, Array) #6 [internal function]: WP_CLI\Dispatcher\CommandFactory in /www/website.com/vendor/eriktorsner/wp-checksum/src/ApiClient.php on line 277 Error: Webbplatsen har tekniska problem. Process completed with status 255 Gave it a quick check and I can get it running with the same repos (tried on multiple sites) when doing it with PHP 7.1 locally. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

eriktorsner avatar Oct 30 '19 12:10 eriktorsner

Are there any news for this fatal error?

edgarmarkosov avatar Aug 03 '20 18:08 edgarmarkosov