[ticket/416] Use extra variable in get_module()

B3P-416
This commit is contained in:
Marc Alexander
2014-11-29 15:04:46 +01:00
parent 3a2782b578
commit 0d429b2f29

View File

@@ -108,12 +108,18 @@ class manager
*/ */
protected function get_module($class_name) protected function get_module($class_name)
{ {
$this->module = $this->portal_helper->get_module($class_name); $module = $this->portal_helper->get_module($class_name);
if (!$this->module instanceof module_interface) if (!$module instanceof module_interface)
{ {
trigger_error('CLASS_NOT_FOUND', E_USER_ERROR); trigger_error('CLASS_NOT_FOUND', E_USER_ERROR);
} }
else
{
$this->module = $module;
}
unset($module);
} }
/** /**