php3-compatibility fix to execmethod's partscount

This commit is contained in:
Miles Lott 2001-08-15 17:31:36 +00:00
parent fefe347b33
commit 5d34135559

View File

@ -106,7 +106,7 @@
function ExecMethod($method, $functionparams = '_UNDEF_', $loglevel = 3, $classparams = '_UNDEF_')
{
/* Need to make sure this is working against a single dimensional object */
$partscount = substr_count($method, '.');
$partscount = count(explode('.',$method)) - 1;
if ($partscount == 2)
{
list($appname,$classname,$functionname) = explode(".", $method);
@ -159,7 +159,8 @@
}
}
unset($GLOBALS['methodparts']);
eval ('$isobject = is_object('.$parentobject.'->'.$classname.');');
$code = '$isobject = is_object('.$parentobject.'->'.$classname.');';
eval ($code);
if (!$isobject)
{
if ($classparams != '_UNDEF_' && ($classparams || $classparams != 'True'))