mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-25 23:39:09 +01:00
Does a small check to see if the requested class exists, before attempting to load and instantiate.
This commit is contained in:
parent
a446455ca4
commit
03a0fdd1a6
@ -68,10 +68,19 @@
|
||||
|
||||
if (!isset($GLOBALS['phpgw_info']['flags']['included_classes'][$classname]) ||
|
||||
!$GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
|
||||
{
|
||||
if(@file_exists(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php'))
|
||||
{
|
||||
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
|
||||
$GLOBALS['phpgw_info']['flags']['included_classes'][$classname] = True;
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw_info']['flags']['included_classes'][$classname] = False;
|
||||
}
|
||||
}
|
||||
if($GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
|
||||
{
|
||||
if ($p1 == '_UNDEF_' && $p1 != 1)
|
||||
{
|
||||
eval('$obj = new ' . $classname . ';');
|
||||
@ -99,6 +108,7 @@
|
||||
/* error_reporting(E_ERROR | E_WARNING | E_PARSE); */
|
||||
return $obj;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@function ExecObject
|
||||
|
Loading…
Reference in New Issue
Block a user