ChangeSet ID: 30927
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner(a)winehq.org 2007/02/03 13:33:20
Modified files:
include : objectManager.php
Log message:
Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com>
Pass an object as the first argument to method_exists(), required by php4
----------------------------------------------------------------------
Patch: http://cvs.winehq.org/patch.py?id=30927
Old revision New revision Changes Path
1.1 1.2 +4 -1 appdb/include/objectManager.php
Index: appdb/include/objectManager.php
diff -u -p appdb/include/objectManager.php:1.1 appdb/include/objectManager.php:1.2
--- appdb/include/objectManager.php:1.1 3 Feb 2007 19:33:20 -0000
+++ appdb/include/objectManager.php 3 Feb 2007 19:33:20 -0000
@@ -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;