I’m dealing with a weird problem related to a plugin I wrote a while back for a client.
The plugin works as expected on both the front and back of the site without errors, however whenever wp-cron.php is called (every 30 minutes) the following errors are generated –
PHP Parse error: syntax error, unexpected end of file in *[PATH TO PLUGIN CLASS FILE]* on line 6279
PHP Notice: Function is_embed was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href=”https://wordpress.org/support/article/debugging-in-wordpress/”>Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /home/398014.cloudwaysapps.com/byktfcewvc/public_html/wp-includes/functions.php on line 5865
PHP Notice: Function is_search was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href=”https://wordpress.org/support/article/debugging-in-wordpress/”>Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /home/398014.cloudwaysapps.com/byktfcewvc/public_html/wp-includes/functions.php on line 5865
Line 6279 is the final line of the plugin class. I’ve gone over the code multiple times both manually and using automated bracket checkers but can’t find any unclosed brackets that would trigger an unexpected end of file error. Neither is_embed nor is_search are called in the class.
Can anyone shed any light on what might be happening?
[ad_2]