Noticed these errors when on the main index page when not signed in (ie Guest):
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/social_zebra.php on line 125: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/social_zebra.php on line 135: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/social_zebra.php on line 135: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/social_zebra.php on line 135: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/social_zebra.php on line 136: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/social_zebra.php on line 136: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/social_zebra.php on line 136: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/pgreca/pgsocial/social/social_zebra.php on line 137: Trying to access array offset on value of type bool
(solved) Trying to access array offset on value of type bool in ext/pgreca/pgsocial/social/social_zebra.php
Re: Trying to access array offset on value of type bool in ext/pgreca/pgsocial/social/social_zebra.php
Locate line 125 which looks like this:
Replace with this:
Locate line 135 which looks like this:
Replace with this:
Locate line 136 which looks like this:
Replace with this:
Locate line 137 which looks like this:
Replace with this:
Code: Select all
if (($row['user_id'] == $user_id) && ($row['zebra_id'] == $this->user->data['user_id']) && ($row['approval'] == 1))Code: Select all
if (($row['user_id'] ?? 'default value' == $user_id) && ($row['zebra_id'] == $this->user->data['user_id']) && ($row['approval'] == 1))Code: Select all
'status' => ($row['friend'] ? 'PG_SOCIAL_FRIENDS' : ($row['approval'] ? 'PG_SOCIAL_FRIENDS_CANCEL_REQ' : ($row['foe'] ? 'PG_SOCIAL_FRIENDS_REMOVE_BLOCK' : 'PG_SOCIAL_FRIENDS_ADD'))),Code: Select all
'status' => ($row['friend'] ?? null ? 'PG_SOCIAL_FRIENDS' : ($row['approval'] ?? null ? 'PG_SOCIAL_FRIENDS_CANCEL_REQ' : ($row['foe'] ?? null ? 'PG_SOCIAL_FRIENDS_REMOVE_BLOCK' : 'PG_SOCIAL_FRIENDS_ADD'))),Code: Select all
'icon' => ($row['friend'] ? 'ok' : ($row['approval'] ? 'remove' : ($row['foe'] ? 'ban-circle' : 'plus'))),Code: Select all
'icon' => ($row['friend'] ?? null ? 'ok' : ($row['approval'] ?? null ? 'remove' : ($row['foe'] ?? null ? 'ban-circle' : 'plus'))),Code: Select all
'friends' => $row['friend'] ? true : false,Code: Select all
'friends' => $row['friend'] ?? null ? true : false,