PHP Fatal error: Uncaught Error: Undefined constant “SECURE_AUTH_COOKIE”
-
Same issue as reported here which was closed without resolution.
If anyone else is experiencing the same error, you can solve it by adding the below code to your theme’s functions.php, this will make sure the constant is defined before the Wordfence _userIDDetermined() function in wordfence/lib/wfLog.php is called, which is what triggers the error.
function my_determine_current_user( $user_id ) { if (!defined('SECURE_AUTH_COOKIE')) { require_once(__DIR__.'/../../../wp-includes/default-constants.php'); } return $user_id; } add_filter( 'determine_current_user', 'my_determine_current_user', 98 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘PHP Fatal error: Uncaught Error: Undefined constant “SECURE_AUTH_COOKIE”’ is closed to new replies.