• When I try to activate the plugin I get this Fatal. Should be simple to address.

    PHP Fatal error: Declaration of Psr\Log\AbstractLogger::emergency($message, array $context = []) must be compatible with Psr\Log\LoggerInterface::emergency(Stringable|string $message, array $context = []): void in /var/www/xxx/plugins/cloudflare/vendor/psr/log/Psr/Log/AbstractLogger.php on line 22
    Fatal error: Declaration of Psr\Log\AbstractLogger::emergency($message, array $context = []) must be compatible with Psr\Log\LoggerInterface::emergency(Stringable|string $message, array $context = []): void in /var/www/xxx/plugins/cloudflare/vendor/psr/log/Psr/Log/AbstractLogger.php on line 22

Viewing 1 replies (of 1 total)
  • Similar problem here with PHP8.1 with fatal errors coming up in my theme:

    Fatal error: Declaration of Psr\Log\NullLogger::log($level, Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::log($level, $message, array $context = []) in /var/www/html/wp-content/themes/<my-theme>/vendor/psr/log/src/NullLogger.php on line 26

    The reason is because cloudflare is using an obsolete version of psr/log that is loaded before the one I would like to use… From cloudflare/composer.json: "psr/log": "^1.0"

    Here is a more recent one with the API that we need: https://packagist.org/packages/psr/log#3.0.0. Cloudflare should bump it to a compatible version but it may break some very old PHP versions.

    See also: https://github.com/php-fig/log/blob/master/src/LoggerInterface.php

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal Error on plugin activation’ is closed to new replies.