Skip to content

Call to a member function isReactedOn() on null #31

Answered by hkp22
NawrasBukhari asked this question in Q&A
Discussion options

You must be logged in to vote

The syntax is:

$user->isReactedOn($article));

Here $user is null. This is the reason you are getting this error. So, you may need to add addition condtion to check, if $user is not null then call the isReactedOn() method.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NawrasBukhari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants