From: spam04 at pornel dot net Operating system: * PHP version: 5.3SVN-2009-11-11 (snap) PHP Bug Type: Reflection related Bug description: property_exists: Closure object cannot have properties
Description:
------------
property_exists() rejects closures with "Closure object cannot have
properties" rather than simply always returning false.
Since closures pass is_object() test, it's hard to avoid this error
without testing for "instanceof Closure" as well, which is discouraged in
the docs.
Reproduce code:
---------------
$obj = function(){}
is_object($obj) && property_exists($obj,'foo');
Expected result:
----------------
false
(either they should not be considered objects, or property_exists should
accept any object).
Actual result:
--------------
"Closure object cannot have properties"
--
Edit bug report at http://bugs.php.net/?id=50146&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50146&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50146&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50146&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50146&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50146&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50146&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50146&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50146&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50146&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50146&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50146&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50146&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50146&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50146&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50146&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50146&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50146&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50146&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50146&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50146&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50146&r=mysqlcfg
