PHP Error: Constant already defined – DONOTDELETECACHE
-
We run WP_DEBUG in logging mode. PHP 7.0.
This PHP error (NOTICE level, but still an error) shows up regularly in the logs:
PHP Notice: Constant DONOTDELETECACHE already defined in {DOCUMENT_ROOT}/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1289Please replace all occurrences of the
define()directive to make them conditional — only define if not already defined.Like so…the fix for line 1289 is to change it from
define( 'DONOTDELETECACHE', 1 );to
if( !defined( 'DONOTDELETECACHE' ) ) { define( 'DONOTDELETECACHE', 1 ); }Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘PHP Error: Constant already defined – DONOTDELETECACHE’ is closed to new replies.