Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would like to add however, that the error above is not so difficult to correct. The problem is that array_key_exists() is sometimes called with a boolean as second parameter instead of an array. It was a problem in PHP 7.x as well, just there it could be masked with the @ symbol.

    Prior to PHP 8.0.0, it was possible for the @ operator to disable critical errors that will terminate script execution. For example, prepending @ to a call of a function which did not exist, by being unavailable or mistyped, would cause the script to terminate with no indication as to why.

    This is the code line:
    if(@!array_key_exists($key, $file_info) && $is_update == false )

    $file_info is a boolean (false) when the preceding option reading is unsuccessful, as the get_option has a return value type of mixed. An easy solution is to check the return value in $file_info before calling array_key_exists function.

    Complete code refactoring would certainly help, probably improve performance, would enable future development, would bring easier maintenance, etc. But if you just need to get the current code to start/work with PHP 8 it is possible with a few corrections, like the one described above.

    Hi,
    I have the same problem as @adriancituli , i.e. I have to revoke access and apply access again about weekly. I enabled debugging in wp-config.php, and the error message is the following:

    Fatal error: Uncaught Error: Class 'Sgdg\Vendor\GuzzleHttp\Psr7\Message' not found in /share/CACHEDEV1_DATA/Web/tarsashaz/wp-content/plugins/skaut-google-drive-gallery/bundled/vendor/guzzlehttp/psr7/src/functions.php:401 Stack trace: #0 /share/CACHEDEV1_DATA/Web/tarsashaz/wp-content/plugins/skaut-google-drive-gallery/bundled/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php(127): Sgdg\Vendor\GuzzleHttp\Psr7\get_message_body_summary(Object(Sgdg\Vendor\GuzzleHttp\Psr7\Response)) #1 /share/CACHEDEV1_DATA/Web/tarsashaz/wp-content/plugins/skaut-google-drive-gallery/bundled/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php(107): Sgdg\Vendor\GuzzleHttp\Exception\RequestException::getResponseBodySummary(Object(Sgdg\Vendor\GuzzleHttp\Psr7\Response)) #2 /share/CACHEDEV1_DATA/Web/tarsashaz/wp-content/plugins/skaut-google-drive-gallery/bundled/vendor/guzzlehttp/guzzle/src/Middleware.php(65): Sgdg\Vendor\GuzzleHttp\Exception\RequestException::create(Object(Sgdg\Vendor\GuzzleHttp\Psr7\Request), Object(Sgdg\Vendor\Gu in /share/CACHEDEV1_DATA/Web/tarsashaz/wp-content/plugins/skaut-google-drive-gallery/bundled/vendor/guzzlehttp/psr7/src/functions.php on line 401

    Hope this helps.
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)