Fatal error on Cache.php
-
Hi! Unfortunately our sites crash when using this plugin with our custom theme, error:
Fatal error: Declaration of Detection\Cache\Cache::get(string $key, mixed $default = null): mixed must be compatible with Psr\SimpleCache\CacheInterface::get($key, $default = null) in /app/public/wp-content/plugins/adv-geoip-redirect/vendor/mobiledetect/mobiledetectlib/src/Cache/Cache.php on line 26
I think it happens because the plugin’s Cache class uses simple-cache with type hints and our sites theme loads an older simple-cache v1.0.1 that has no type hints.
I tested the plugin by removing type hints and declare(strict_types=1) from Cache.php and after that it worked flawlessly.
Is there anything that can be done to support older themes as well?
Also one feature recommendation: it would be nice to be able to disable redirection for admins, because on our sites we use Beaver Builder which is a front end site builder. That means we have to disable redirection manually every time to be able edit the page where user is being redirected from.
You must be logged in to reply to this topic.