From: mbecc...@php.net Operating system: Irrelevant PHP version: 5.3CVS-2009-03-31 (CVS) PHP Bug Type: Class/Object related Bug description: is_callable throws fatal error
Description: ------------ Under some circumstances is_callable() throws a fatal error when testing if the PHP4-style constructor of the class (e.g. is_callable(array('test1', 'test1')). Unfortunately I wasn't able to create a self-contained example, but the issue seems to happen often when using Simpletest Mocks in the OpenX test suite. It's ok if is_callable returns false if the method cannot be called statically, but definitely a fatal error isn't expected. Reproduce code: --------------- echo "Test"; is_callable(array('OX_Dal_Maintenance_Statistics', 'OX_Dal_Maintenance_Statistics')); Expected result: ---------------- Test Actual result: -------------- Test Fatal error: Non-static method OX_Dal_Maintenance_Statistics::OX_Dal_Maintenance_Statistics() cannot be called statically in ... -- Edit bug report at http://bugs.php.net/?id=47851&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47851&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47851&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47851&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47851&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47851&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47851&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47851&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47851&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47851&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47851&r=support Expected behavior: http://bugs.php.net/fix.php?id=47851&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47851&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47851&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47851&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47851&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47851&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47851&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47851&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47851&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47851&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47851&r=mysqlcfg