I have a module that I have been using for quite a while now. It's a promotion that run every few months. For some reason now, I get a random white screen of death. I'm putting my code below.
We narrowed the problem down to the "return theme('themehook_entry_form', $yourArgumentObject);" line. It will work for a while. Then all of the sudden, WSOD. I can't figure out a cause. I just know that sometimes it does not make that theme call. We have circumvented the problem by using PHP output buffering. I shouldn't have to do this, but it has alleviated the problem completely.
Does anyone know of a reason that might happen? Why it might run fine for a while and then all of the sudden break?
function jxpromo_menu() {
$items = array();
$items['mosquito-repellent/outdoors/promotions/entry-form'] = array(
'title' => 'August Giveaway Entry Form',
'description' => 'Entry Form',
'page callback' => 'jxpromo_entry_page',
'access callback' => 'user_access',
'access arguments' => array('access promotions'),
'type' => MENU_NORMAL_ITEM,
'file' => 'jxpromo_forms.inc',
);
return $items;
}
<?php
function jxpromo_entry_page() {
$yourArgumentObject['has_profile'] = FALSE;
$getFormPass = drupal_get_form('jxpromo_user_pass');
$getFormLogin = drupal_get_form('jxpromo_form_login');