Rollback php3-incompatible code in createobject

This commit is contained in:
Miles Lott 2001-08-02 14:56:23 +00:00
parent c19c3f3966
commit 8f4f5e105c

View File

@ -61,7 +61,7 @@
} }
if ($p1 == '_UNDEF_') if ($p1 == '_UNDEF_')
{ {
$ret = eval("\$obj = new \$classname; if(is_object(\$obj)) { return True; };"); eval("\$obj = new \$classname;");
} }
else else
{ {
@ -80,18 +80,11 @@
} }
$i++; $i++;
} }
$code = substr($code,0,-1) . "); if(is_object(\$obj)) { return True; };"; $code = substr($code,0,-1) . ");";
$ret = eval($code); eval($code);
} }
error_reporting(E_ERROR | E_WARNING | E_PARSE); error_reporting(E_ERROR | E_WARNING | E_PARSE);
if($ret) return $obj;
{
return $obj;
}
else
{
return False;
}
} }
/*! /*!
@function lang @function lang