bluehost / endurance-page-cache

Other
24 stars 11 forks source link

test for is_user_logged_in() before calling #53

Closed afragen closed 5 years ago

afragen commented 5 years ago

My debug.log is littered with PHP notices reporting that is_404 and is_feed are being called incorrectly. I have traced this back to this file.

[28-Mar-2019 22:17:21 UTC] PHP Notice is_404 was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home4/thefrage/public_html/thefragens.com/wp-includes/functions.php on line 4667 [28-Mar-2019 22:17:21 UTC] PHP Notice is_feed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home4/thefrage/public_html/thefragens.com/wp-includes/functions.php on line 4667

This PR should fix those issues.

Ping @MikeHansenMe

afragen commented 5 years ago

Hmm, not sure whether or not the errors are from this file, but I never got them before having this file active on my sites.

0aveRyan commented 5 years ago

Thanks @afragen, will review this morning

afragen commented 5 years ago

This should fix #31

afragen commented 5 years ago

Closing in favor of #57