Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
BUG: refs #0381. Cleaned out error supression.
Browse files Browse the repository at this point in the history
Since we have error reporting turned on for STRICT, and we are setting
fields on a field that itself has not yet been created, we were generating
error messages.  By explicitly creating the field if the field does not yet
exist, the error message isn't generated, thus error supression can be removed.
  • Loading branch information
Michael Grauer committed Dec 2, 2011
1 parent 25cb6bc commit 581e95a
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 14 deletions.
13 changes: 11 additions & 2 deletions core/GlobalController.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ public function loadElements()
{
$nameComponent = $component . "Component";
Zend_Loader::loadClass($nameComponent, BASE_PATH . '/core/controllers/components');
@$this->Component->$component = new $nameComponent();
if(!isset($this->Component))
{
$this->Component = new stdClass();
}
$this->Component->$component = new $nameComponent();
}
}

Expand All @@ -188,7 +192,12 @@ public function loadElements()
$nameForm = $forms . "Form";

Zend_Loader::loadClass($nameForm, BASE_PATH . '/core/controllers/forms');
@$this->Form->$forms = new $nameForm();

if(!isset($this->Form))
{
$this->Form = new stdClass();
}
$this->Form->$forms = new $nameForm();
}
}
}//end loadElements
Expand Down
6 changes: 5 additions & 1 deletion core/models/GlobalDao.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ public function loadElements()
{
$nameComponent = $component . "Component";
Zend_Loader::loadClass($nameComponent, BASE_PATH . '/core/controllers/components');
@$this->Component->$component = new $nameComponent();
if(!isset($this->Component))
{
$this->Component = new stdClass();
}
$this->Component->$component = new $nameComponent();
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion core/models/MIDASModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ public function loadElements()
$nameComponent = $component . "Component";

Zend_Loader::loadClass($nameComponent, BASE_PATH . '/core/controllers/components');
@$this->Component->$component = new $nameComponent();
if(!isset($this->Component))
{
$this->Component = new stdClass();
}
$this->Component->$component = new $nameComponent();
}
}
}
Expand Down
24 changes: 20 additions & 4 deletions core/models/MIDASUpgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ public function loadModuleElements()
{
$nameComponent = ucfirst($this->moduleName).'_'.$component . "Component";
include_once (BASE_PATH . "/modules/".$this->moduleName."/controllers/components/".$component."Component.php");
@$this->ModuleComponent->$component = new $nameComponent();
if(!isset($this->ModuleComponent))
{
$this->ModuleComponent = new stdClass();
}
$this->ModuleComponent->$component = new $nameComponent();
}
}

Expand All @@ -104,7 +108,11 @@ public function loadModuleElements()
{
$nameForm = ucfirst($this->moduleName).'_'.$forms . "Form";
include_once (BASE_PATH . "/modules/".$this->moduleName."/controllers/forms/".$forms."Form.php");
@$this->ModuleForm->$forms = new $nameForm();
if(!isset($this->ModuleForm))
{
$this->ModuleForm = new stdClass();
}
$this->ModuleForm->$forms = new $nameForm();
}
}
}
Expand Down Expand Up @@ -143,7 +151,11 @@ public function loadElements()
{
$nameComponent = $component . "Component";
Zend_Loader::loadClass($nameComponent, BASE_PATH . '/core/controllers/components');
@$this->Component->$component = new $nameComponent();
if(!isset($this->Component))
{
$this->Component = new stdClass();
}
$this->Component->$component = new $nameComponent();
}
}

Expand All @@ -155,7 +167,11 @@ public function loadElements()
$nameForm = $forms . "Form";

Zend_Loader::loadClass($nameForm, BASE_PATH . '/core/controllers/forms');
@$this->Form->$forms = new $nameForm();
if(!isset($this->Form))
{
$this->Form = new stdClass();
}
$this->Form->$forms = new $nameForm();
}
}
}//end loadElements
Expand Down
12 changes: 10 additions & 2 deletions modules/GlobalModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ public function loadModuleElements()
{
$nameComponent = ucfirst($this->moduleName).'_'.$component . "Component";
include_once (BASE_PATH . "/modules/".$this->moduleName."/controllers/components/".$component."Component.php");
@$this->ModuleComponent->$component = new $nameComponent();
if(!isset($this->ModuleComponent))
{
$this->ModuleComponent = new stdClass();
}
$this->ModuleComponent->$component = new $nameComponent();
}
}

Expand All @@ -128,7 +132,11 @@ public function loadModuleElements()
{
$nameForm = ucfirst($this->moduleName).'_'.$forms . "Form";
include_once (BASE_PATH . "/modules/".$this->moduleName."/controllers/forms/".$forms."Form.php");
@$this->ModuleForm->$forms = new $nameForm();
if(!isset($this->ModuleForm))
{
$this->ModuleForm = new stdClass();
}
$this->ModuleForm->$forms = new $nameForm();
}
}
}
Expand Down
24 changes: 20 additions & 4 deletions notification/GlobalNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ public function loadElements()
{
$nameComponent = $component . "Component";
Zend_Loader::loadClass($nameComponent, BASE_PATH . '/core/controllers/components');
@$this->Component->$component = new $nameComponent();
if(!isset($this->Component))
{
$this->Component = new stdClass();
}
$this->Component->$component = new $nameComponent();
}
}

Expand All @@ -127,7 +131,11 @@ public function loadElements()
$nameForm = $forms . "Form";

Zend_Loader::loadClass($nameForm, BASE_PATH . '/core/controllers/forms');
@$this->Form->$forms = new $nameForm();
if(!isset($this->Form))
{
$this->Form = new stdClass();
}
$this->Form->$forms = new $nameForm();
}
}
}//end loadElements
Expand Down Expand Up @@ -167,7 +175,11 @@ public function loadModuleElements()
{
$nameComponent = ucfirst($this->moduleName).'_'.$component . "Component";
include_once (BASE_PATH . "/modules/".$this->moduleName."/controllers/components/".$component."Component.php");
@$this->ModuleComponent->$component = new $nameComponent();
if(!isset($this->ModuleComponent))
{
$this->ModuleComponent = new stdClass();
}
$this->ModuleComponent->$component = new $nameComponent();
}
}

Expand All @@ -177,7 +189,11 @@ public function loadModuleElements()
{
$nameForm = ucfirst($this->moduleName).'_'.$forms . "Form";
include_once (BASE_PATH . "/modules/".$this->moduleName."/controllers/forms/".$forms."Form.php");
@$this->ModuleForm->$forms = new $nameForm();
if(!isset($this->ModuleForm))
{
$this->ModuleForm = new stdClass();
}
$this->ModuleForm->$forms = new $nameForm();
}
}
}
Expand Down

0 comments on commit 581e95a

Please sign in to comment.