Remove workaround for PHP4

This commit is contained in:
Alexander Nicolaysen Sørnes
2008-03-12 00:31:46 +01:00
committed by Chris Morgan
parent 728df32ac9
commit a15bd62b7e

View File

@@ -148,10 +148,7 @@ class ObjectManager
/* Check whether the associated class has the given method */ /* Check whether the associated class has the given method */
public function checkMethod($sMethodName, $bEnableOutput) public function checkMethod($sMethodName, $bEnableOutput)
{ {
// NOTE: we only 'new' here because php4 requires an instance if(!method_exists($this->sClass, $sMethodName))
// 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"; if($bEnableOutput) echo "class '".$this->sClass."' lacks method '".$sMethodName."'\n";
return false; return false;