#49537 [NEW]: ArrayAccess offsetSet give null argument values when using $append[]

From: Date: Sat, 12 Sep 2009 22:07:30 +0000
Subject: #49537 [NEW]: ArrayAccess offsetSet give null argument values when using $append[]
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-142284@lists.php.net to get a copy of this message
From: kevinpeno at gmail dot com Operating system: WIN7 PHP version: 5.3.0 PHP Bug Type: SPL related Bug description: ArrayAccess offsetSet give null argument values when using $append[] Description: ------------ Whenever you use the $append[] method, offsetGet in object implementing ArrayAccess. Reproduce code: --------------- <?php class MyArrayObject extends ArrayObject { function offsetSet( $k, $v ) { //Will Print OffsetSet: \n NULL \n NULL - var_dump( 'offsetSet:', $k, $value ); } } $test = new MyArrayObject(); $test[] = 'test'; ?> Expected result: ---------------- Arguments in offsetGet should return the new offset key and the value properly. Actual result: -------------- $k and $v in the example above var_dump to NULL -- Edit bug report at http://bugs.php.net/?id=49537&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49537&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49537&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49537&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49537&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49537&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49537&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49537&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49537&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49537&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49537&r=support Expected behavior: http://bugs.php.net/fix.php?id=49537&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49537&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49537&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49537&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49537&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49537&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49537&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49537&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49537&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49537&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49537&r=mysqlcfg

« previous php.bugs (#142284) next »