Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Plugins by


When viewing the profile page of the admin, the following error is displayed, but this message is not displayed on the profile pages of normal users.

Notice: Trying to access array offset on value of type null in C:\wamp64\www\q2an\qa-plugin\q2a-badges-master\qa-plugin.php on line 516

How do I fix it?

Q2A version: 1.8

1 Answer

+1 vote
selected by
Best answer

Well, if you are getting that error, you should be facing a similar error on line 512, based on the code.

Between line 511 and 512 add:

if (empty($post)) {

Untested, but it should do the trick.