(solved) Trying to access array offset on value of type bool in ext/pgreca/pgsocial/social/post_status.php

For documentation of changes to the PGSocial Network extension
Post Reply
User avatar
Mandi
Site Admin
Site Admin
Posts: 47
Joined: July 31st, 2023, 8:37 pm
Location: Somewhere, Canada
Contact:

(solved) Trying to access array offset on value of type bool in ext/pgreca/pgsocial/social/post_status.php

Post by Mandi »

When trying out the "Like" status feature I received this error:
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/post_status.php on line 753: Trying to access array offset on value of type bool
User avatar
Mandi
Site Admin
Site Admin
Posts: 47
Joined: July 31st, 2023, 8:37 pm
Location: Somewhere, Canada
Contact:

Re: Trying to access array offset on value of type bool in ext/pgreca/pgsocial/social/post_status.php

Post by Mandi »

Locate line 753 which looks like this:

Code: Select all

if ($row['post_like_ID'] != '')
Replace with this:

Code: Select all

if ($row['post_like_ID'] ?? null != '')
Post Reply