rhubarbgroup / redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
https://wordpress.org/plugins/redis-cache/
GNU General Public License v3.0
425 stars 148 forks source link

Missing property in object cache class #539

Open danielvonmitschke opened 1 month ago

danielvonmitschke commented 1 month ago

In wp-activate.php it tries to disable any third party object cache by setting cache_enabled to false. This property does not exist in the redis object cache class und therefore throws a warning in PHP 8.2 about "Creation of dynamic properties".

To reproduce just use a default wordpress installation with redis object cache and PHP 8.2. Then go to http://yoursite/wp-activate.php and observe your log file.

(I actually don't know what wp-activate is for, but I saw it in my log file - just wanted to let you know)

tillkruss commented 1 month ago

Mhhh, @danielvonmitschke right. I wonder if it's worth asking why they are disabling in such a non-standardized form (might be WP.com code).

Do you want to research that?

danielvonmitschke commented 1 month ago

Did a little research but unfortunately I didn't get very far. Anyway, just wanted to let you know.

Best, Daniel

tillkruss commented 2 weeks ago

I'd report this to WP core, they can check for the property.

mrian4296 commented 4 days ago

In wp-activate.php it tries to disable any third party object cache by setting cache_enabled to false. This property does not exist in the redis object cache class und therefore throws a warning in PHP 8.2 about "Creation of dynamic properties".

To reproduce just use a default wordpress installation with redis object cache and PHP 8.2. Then go to http://yoursite/wp-activate.php and observe your log file.

(I actually don't know what wp-activate is for, but I saw it in my log file - just wanted to let you know)

mrian4296 commented 4 days ago

https://github.com/rhubarbgroup/redis-cache/issues/539#issue-2415550427