phpjoomlaexitdiewsod

PHP die PREVENTING White Screen of Death?


I am trying to enumerate through a perfectly valid array using php 5.3.5 on Joomla 1.5. Whenever I try to access the array I get the white screen of death. If I add a die() statement right after then I get the array, (but of course, execution after that is halted). I purposely put no code after array call and die() for debugging purposes. Removing die doesn't echo the array. Has anyone else had this issue before?

Edit: yes, turned error checking on. WSOD is BLANK.

**in the View class:**

$seminarsRefDB =& JFactory::getDBO();
                $seminarsRefQuery = [MYSQL STUFF]
                $seminarsRefDB->setQuery($seminarsRefQuery);
                $seminarsRefList = $seminarsRefDB->loadAssocList();


for($i=0; $i<count($seminarsRefList); $i++) {

$classAppendix = $i;
                $seminarselects[] = JHTML::_('select.genericList', $seminar_options, 'seminar_title[]', 'class="seminardropdown" style="width:200px;"', 'value', 'text', $seminarsRefList[$i]['value'], 'seminar'.$classAppendix);
            };



$this->assignRef('seminarsArray', $seminarselects);


**In the Default Template**

print_r($this->seminarsArray[0]);
die;

END

I have another array called speakersArray which is echoed perfectly. I copied this code verbatim from the backend of my site where both arrays show no problems.

Used get_included_files and the default template is the last file included, so execution stops there.


Solution

  • You should turn on display_errors and error_reporting to E_ALL so you don't get a white screen of death and have your server tell you what errors it is getting.

    It sounds to me that if its a big array and your passing it around, you could be running out of memory at some point in the code. By placing a die right after the array, you may have not hit that threshold yet.