Multiple php warnings on view profile page

For assistance with the phpBB Wall extension
Post Reply
User avatar
Mandi
Site Admin
Site Admin
Posts: 47
Joined: July 31st, 2023, 8:37 pm
Location: Somewhere, Canada
Contact:

Multiple php warnings on view profile page

Post by Mandi »

Lots of php warnings when viewing profile shows up. They are as follows

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/zebra.php on line 263: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/zebra.php on line 273: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/zebra.php on line 273: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/zebra.php on line 273: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/zebra.php on line 274: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/zebra.php on line 274: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/zebra.php on line 274: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/zebra.php on line 275: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/gallery.php on line 91: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/wall/gallery.php on line 92: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/music/music.php on line 159: Undefined variable $data
User avatar
Mandi
Site Admin
Site Admin
Posts: 47
Joined: July 31st, 2023, 8:37 pm
Location: Somewhere, Canada
Contact:

Re: Multiple php warnings on view profile page

Post by Mandi »

For zebra.php

Locate line 263 which looks like this:

Code: Select all

if ($row['user_id'] == $user_id && $row['zebra_id'] == $this->user->data['user_id'] && $row['approval'] == 1)
Replace with this:

Code: Select all

if ($row['user_id'] ?? 'default value' == $user_id && $row['zebra_id'] == $this->user->data['user_id'] && $row['approval'] == 1)
Locate line 273 which looks like this:

Code: Select all

"status"  => ($row['friend'] ? $this->user->lang('WALL_FRIENDS') : ($row['approval'] ? $this->user->lang('WALL_FRIENDS_CANCEL_REQ') : ($row['foe'] ? $this->user->lang('WALL_FRIENDS_REMOVE_BLOCK') : $this->user->lang('WALL_FRIENDS_ADD')))),
Replace with this:

Code: Select all

"status"  => ($row['friend'] ?? null ? $this->user->lang('WALL_FRIENDS') : ($row['approval'] ?? null ? $this->user->lang('WALL_FRIENDS_CANCEL_REQ') : ($row['foe'] ?? null ? $this->user->lang('WALL_FRIENDS_REMOVE_BLOCK') : $this->user->lang('WALL_FRIENDS_ADD')))),
Locate line 274 which looks like this:

Code: Select all

"icon"    => ($row['friend'] ? 'ok' : ($row['approval'] ? 'remove' : ($row['foe'] ? 'ban-circle' : 'plus'))),
Replace with this:

Code: Select all

"icon"    => ($row['friend'] ?? null ? 'ok' : ($row['approval'] ?? null ? 'remove' : ($row['foe'] ?? null ? 'ban-circle' : 'plus'))),
Locate line 275 which looks like this:

Code: Select all

"friends" => $row['friend'] ? true : false,
Replace with this:

Code: Select all

"friends" => $row['friend'] ?? null ? true : false,
For file gallery.php

Locate line 91 which looks like this:

Code: Select all

"cover"  => ($photo['photo_path'] ? $this->wall_helper->generate_wall_url('images') . $photo['wall_id'].'/'.$photo['photo_path'] : generate_board_url(). '/ext/msaulohenrique/wall/images/no_cover.png'),
Replace with this:

Code: Select all

"cover"  => ($photo['photo_path'] ?? null ? $this->wall_helper->generate_wall_url('images') . $photo['wall_id'].'/'.$photo['photo_path'] : generate_board_url(). '/ext/msaulohenrique/wall/images/no_cover.png'),
Locate line 92 which looks like this:

Code: Select all

"top"    => $photo['cover_top'],
Replace with this:

Code: Select all

"top"    => $photo['cover_top'] ?? null,
For music.php

Locate line 159 which looks like this:

Code: Select all

return $data;
Replace with this:

Code: Select all

return isset($data)?$data:'';
Post Reply