Add workaround in createobject for VERY weird case where $p1 == '_UNDEF_' evaluates as True

if $p1 = True or 1 ;)
This commit is contained in:
Miles Lott 2001-08-05 22:40:32 +00:00
parent 17347d9bcb
commit f4359e5514

View File

@ -56,9 +56,10 @@
$GLOBALS['phpgw_info']['flags']['included_classes'][$classname] = True;
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
}
if ($p1 == '_UNDEF_')
if ($p1 == '_UNDEF_' && $p1 != 1)
{
eval('$obj = new '.$classname.';');
$code = '$obj = new '.$classname.';';
eval($code);
}
else
{
@ -67,7 +68,7 @@
$code = '$obj = new '.$classname.'(';
while (list($x,$test) = each($input))
{
if ($test == '_UNDEF_' || $i == 17)
if (($test == '_UNDEF_' && $test != 1 ) || $i == 17)
{
break;
}
@ -182,7 +183,7 @@
{
return 'error in parts';
}
}
}
/*!
@function lang