Pass an object as the first argument to method_exists(), required by php4

----------------------------------------------------------------------
This commit is contained in:
Alexander Nicolaysen Sørnes
2007-02-03 19:33:20 +00:00
committed by WineHQ
parent c8698266a0
commit 21a18c5d09

View File

@@ -20,7 +20,10 @@ class ObjectManager
/* Check whether the associated class has the given method */
function checkMethod($sMethodName, $bEnableOutput)
{
if(!method_exists($this->sClass, $sMethodName))
// NOTE: we only 'new' here because php4 requires an instance
// of an object as the first argument to method_exists(), php5
// doesn't
if(!method_exists(new $this->sClass(), $sMethodName))
{
if($bEnableOutput) echo "class '".$this->sClass."' lacks method '".$sMethodName."'\n";
return false;