Pass an object as the first argument to method_exists(), required by php4
----------------------------------------------------------------------
This commit is contained in:
committed by
WineHQ
parent
c8698266a0
commit
21a18c5d09
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user