Fatal Error in...

Search
Other Bug Reports questions
Forum

Fatal Error in libraries/regularlabs/vendor/m​obiledetect/mobiledetectlib/sr​c/Cache/Cache.php (line 30)

Roland's Avatar Roland
Hi.

All in actual version.

For information

Compile Error: Declaration of Detection\Cache\Cache::get(string $key, mixed $default = null): ?Detection\Cache\CacheItem must be compatible with Psr\SimpleCache\CacheInterface::get($key, $default = null)

in /var/www/sites/web2/web/libraries/regularlabs/vendor/mobiledetect/mobiledetectlib/src/Cache/Cache.php (line 30)

Regards
Roland
Peter van Westen's Avatar Peter van Westen ADMIN
You are probably using another extension that is also loading a detection library and is conflicting with it.
Make sure all your extensions are uptodate.
Please post a rating at the Joomla! Extensions Directory
Roland's Avatar Roland
Hi.
I have tracked the error.

The problem come from here

/libraires/regularslabs/vendor/mobiledetect/mobiledetectlib/src/MobileDetect.php line 1032
And after on
/libraires/regularslabs/vendor/mobiledetect/mobiledetectlib/src/Cache/Cache.php line 30

I think that the problem came with incompatibility with droptables

At this line 30 you load the droptable :
/administrator/components/com_droptables/classes/vendor/psr/simple-cache/src/CacheInterface.php

instead (i think) of your
/libraires/regularslabs/vendor/pst/simple-cache//src/Cache/Interface.php

A namespace problem perheaps ?

I have effectively the 2x the interface definition .../psr/simple-cache/src/CacheInterface.php with namespace Psr/SimpleCache :

In /libraires/regularslabs/vendor/pst/simple-cache//src/Cache/Interface.php :
public function get(string $key, mixed $default = null): mixed;

In /administrator/components/com_droptables/classes/vendor/psr/simple-cache/src/CacheInterface.php :
public function get($key, $default = null);


Regards
Peter van Westen's Avatar Peter van Westen ADMIN
Yes, pretty much a conflict due to both using the same 3rd party libraries. I don't think there is much we can do about that...
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases

I have updated the Regular Labs Library to 'scope' external loaded libraries. So this should prevent namespace conflicts...
Please post a rating at the Joomla! Extensions Directory
Roland's Avatar Roland
Hi Peter.

Perfect, it's solved with the new release of advencedmodulemanager.

Thanks.
Roland
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, great 🙂
The fix will be included in the next release.
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in