From: tbarstow at workflowbydesign dot com Operating system: Mac OS X PHP version: 5.1.2 PHP Bug Type: SPL related Bug description: Bad error message for ArrayAccess return by reference
Description: ------------ This is related to the issue with ArrayAccess not being able to return by reference. See: http://bugs.php.net/bug.php?id=32983 http://bugs.php.net/bug.php?id=34783 However this is NOT a re-post of the above referenced bug. Rather, I am reporting a bug that relates to the error message that results from this situation. The error message reads: "Objects used as arrays in post/pre increment/decrement must return values by reference". Two issues with this: 1. It's not possible to do. "Objects used as arrays" cannot return values by reference, as noted in the bugs referenced above. 2. This doesn't only happen in post/pre increment/decrement cases. There are a couple of examples in the bugs linked above; others exist as well (consider passing $array_access_object['foo'] to a function that takes a reference, for example). -- Edit bug report at http://bugs.php.net/?id=37259&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37259&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37259&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37259&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37259&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37259&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37259&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37259&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37259&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37259&r=support Expected behavior: http://bugs.php.net/fix.php?id=37259&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37259&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37259&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37259&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37259&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37259&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37259&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37259&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37259&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37259&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37259&r=mysqlcfg