Page 1 of 1

Multiple php warnings on view profile page (as regular member)

Posted: August 18th, 2023, 2:45 am
by Mandi
Logged in as regular member, when logged in viewing own profile produced these php warnings:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/controller/main.php on line 478: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/controller/main.php on line 479: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/controller/main.php on line 480: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/ext/msaulohenrique/wall/controller/main.php on line 481: Trying to access array offset on value of type bool

Re: Multiple php warnings on view profile page (as regular member)

Posted: August 18th, 2023, 3:03 am
by Mandi
Fix for the warnings is find lines from 478 to 481 which looks like this:

Code: Select all

                             'LOCATION'		        => $field['pf_phpbb_location'],	
                             'OCCUPATION'   	    => $field['pf_phpbb_occupation'],
							 'FACEBOOK'		        => $field['pf_phpbb_facebook'],	
                             'WEBSITE'  		    => $field['pf_phpbb_website'],
Replace with this:

Code: Select all

                             'LOCATION'		        => $field['pf_phpbb_location'] ?? null,	
                             'OCCUPATION'   	    => $field['pf_phpbb_occupation'] ?? null,
							 'FACEBOOK'		        => $field['pf_phpbb_facebook'] ?? null,	
                             'WEBSITE'  		    => $field['pf_phpbb_website'] ?? null,