Anspress 4: Fatal Crash

Solved3.65K viewsIssues
0

I see 4 times that crash in my debug.log, i have no idea when and how it happens.

 

__

 

 

[23-Feb-2017 13:29:59 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_queried_object() on null in /home/wp-includes/query.php:45
Stack trace:
#0 /home/wp-content/plugins/anspress-question-answer/includes/functions.php(146): get_queried_object()
#1 /home/wp-content/plugins/anspress-question-answer/includes/functions.php(169): is_anspress()
#2 /home/wp-content/plugins/anspress-question-answer/includes/views.php(40): is_question()
#3 /home/wp-includes/class-wp-hook.php(298): AnsPress_Views::insert_views(”)
#4 /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#5 /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#6 /home/wp-includes/load.php(677): do_action(‘shutdown’)
#7 [internal function]: shutdown_action_hook()
#8 {main}
thrown in /home/wp-includes/query.php on line 45

selected answer

Rahul could you also check this ? It seems to happen when new Q or A are posted, not sure exactly when.

When nothing new happens, no errors.

0

Today i tried to replicate it, but no error showed. Also the debug.log is clean from that error for the last days or so.

So i’m closing this.

commented on answer

This may be because you are calling some AnsPress function before init hook.

I have not added or touched anything in any WP code. If what you say really is the case, some plugin is doing that and not me.

I will keep an eye open for this and see what happens….