Solid, needs some polishing
-
Hey Chris, when setting a potentially faulty redis config, the plugin breaks
PHP Fatal error: Uncaught Error: Call to a member function setOption() on null in pathtowordpress/plugins/mega-cache/includes/atec-wpmc-connect-redis.php:30Here’s the problematic line:
if (($rdSettings['serializer']??0)!==0) @$atec_wpmc_source['redis']->setOption(Redis::OPT_SERIALIZER, $rdSettings['serializer']);A Redis option (
Redis::OPT_SERIALIZER) is only set if the'serializer'key exists and isn’t 0 in$rdSettings, but if the Redis connection doesn’t succeed due to a bad config, then$atec_wpmc_source['redis']will be set tonullwithin thatcatchblock, so the plugin should only set the option if the Redis connection was successful, like if$atec_wpmc_source['redis']isntnull
The topic ‘Solid, needs some polishing’ is closed to new replies.