Originally I was trying to solve this issue:
403 Error Persists After Changing File Permissions & Editing Htaccess File
Before I make too many changes to my code I would like to understand the problem.
After the suggestion of @misorude I checked the PHP error logs for the directory that the code causing the error existed in. I found the following error.
[12-Jan-2019 15:23:49 America/Chicago] PHP Warning: Invalid argument supplied for foreach() in /home/bullbusterweb/public_html/community/profile.php on line 898
I have tried the following to understand this issue.
1) I googled what invalid argument supplied for foreach() could mean and found the following result.
Invalid argument supplied for foreach()
2) Then I looked at my code to see what could be causing this.
The foreach in question was here:
'''php
foreach($Articles as $Article){
'''
The first place 'Articles is defined is
$Articles = $Ambassador->getArticles();
A few lines above the foreach() I found the following code related to the articles variable.
// var_dump($Articles);
if(isset($Articles)){
According to the php manual:
var_dump : "Dumps information about a variable" .
isset: " Determines if a variable is set and is not NULL"
I tried uncommenting the var_dump but found that it messed up the formatting of the page. So now I know why it is commented out.