simonpayne
asked 8 years ago

Hi

I am getting the following error when submitting a question.

Notice: Trying to get property of non-object in /wp-content/plugins/dw-question-answer/inc/User.php on line 152

Notice: Trying to get property of non-object in /wp-content/plugins/dw-question-answer/inc/User.php on line 152

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/dw-question-answer/inc/User.php:152) in /wp-includes/pluggable.php on line 1174

WP Version – 4.6.1

Theme – TwentyFourteen

Hope you can solve this for me as your plugin looks great so far..

Kind Regards

SimonPayne

1 Answers
Kevin
answered 8 years ago

Hi,

Please go to /wp-content/plugins/dw-question-answer/inc/User.php and replace the code at the 152 from

if ( 'dwqa-answer' == $post->post_type || 'dwqa-question' == $post->post_type ) {

to

if ( isset( $post->ID ) && ( 'dwqa-answer' == $post->post_type || 'dwqa-question' == $post->post_type ) ) {

simonpayne
replied 8 years ago

Thank you this has solved the issue

Great Support and Plugin

Simon

venneto
replied 8 years ago

Same problem here:

WordPress 4.6.1
DWQA 1.4.5

This solution worked here too! Thank you.

Powered by DW Question & Answer Pro