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

Check if WP_REDIS_PLUGIN_PATH is defined before defining #494

Closed rbackert closed 10 months ago

rbackert commented 10 months ago

When using this as a must-use plugin, developers must define WP_REDIS_PLUGIN_PATH so the drop-in can locate files. The main plugin file also defines this constant, but without checking if it's already been defined, triggering PHP warnings.

Check if constant is defined before defining it, to avoid warnings.

tillkruss commented 10 months ago

Thanks, can you add a CHANGELOG entry too?