Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
564 views
in Q2A Core by

Hi,

 After I converted my site to (php 7.4) I got an error in the error log as follows :

PHP Notice:  Trying to access array offset on value of type null in /home1/qa-include/app/post-update.php on line 424

This happens after I moderate a question submitted by an unregistered user

 The other error :

PHP Notice:  Trying to access array offset on value of type null in /home1/qa-include/app/users.php on line 418

some times  also

I hope someone can help solve it

Q2A version: Version 1.8.5

1 Answer

+2 votes
by
selected by
 
Best answer
Q2A works perfectly fine with PHP 7.4. In fact, that's probably the best PHP version to use 1.8.6.

If you're facing issues it is most likely related to a plugin. Try removing all plugins (except from the ones that come with Q2A) and retest.

For the first error, I'm under the impression the test is related to closing/opening questions.

The second error, seems to be related to session management. It seems to be trying to get a session from a deleted user. Most likely you have deleted a user that was navigating the site. You can disregard that one.
by
Thanks a lot pupi ,  I will implement your advice and see what happens. I hope we come to a solution . ✨
by
+1
By the way, here is the fix for the "second error": https://github.com/q2a/question2answer/pull/944/files

Just apply those changes, delete a few users (that should be navigating the site) and you shouldn't get any error after their first page refresh.
...