From 21a18c5d09bb21d6a04ea09424df38a46be15b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sat, 3 Feb 2007 19:33:20 +0000 Subject: [PATCH] Pass an object as the first argument to method_exists(), required by php4 ---------------------------------------------------------------------- --- include/objectManager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/objectManager.php b/include/objectManager.php index 2879009..a564082 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -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;