Page 1 of 1

(solved) Bool warning when posting an activity to the profile wall

Posted: August 18th, 2023, 4:34 pm
by Mandi
This warning showed up when posting an activity to the profile wall

Code: Select all


    Activity 

    [phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/post_status.php on line 516: Trying to access array offset on value of type bool

Re: Bool warning when posting an activity to the profile wall

Posted: August 18th, 2023, 5:10 pm
by Mandi
Locate line 516 which looks like this

Code: Select all

($status_privacy == 1 && ($this->social_zebra->friend_status($row['wall_id'])['status'] == 'PG_SOCIAL_FRIENDS' || $this->user->data['user_id'] == $row['wall_id'])) ||
Replace with this:

Code: Select all

($status_privacy == 1 && ($this->social_zebra->friend_status($row['wall_id'])['status'] ?? null == 'PG_SOCIAL_FRIENDS' || $this->user->data['user_id'] == $row['wall_id'])) ||