#48385 [NEW]: current() on SplObjectStorage returns boolean instead of object
| From: | karsten at typo3 dot org | Date: | Mon, 25 May 2009 14:54:15 +0000 |
| Subject: | #48385 [NEW]: current() on SplObjectStorage returns boolean instead of object | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-137709@lists.php.net to get a copy of this message | ||
From: karsten at typo3 dot org
Operating system: MacOS
PHP version: 5.3.0RC2
PHP Bug Type: SPL related
Bug description: current() on SplObjectStorage returns boolean instead of object
Description:
------------
When using current on an SplObjectStorage instance I'd expect (according
to the documentation) to get the current object back. Instead I get back
false.
Reproduce code:
---------------
<?php
$s = new SplObjectStorage();
$o = new stdClass();
$s->attach($o);
reset($s);
var_dump(current($s));
?>
Expected result:
----------------
object(stdClass)#2 (0) {
}
Actual result:
--------------
bool(false)
--
Edit bug report at http://bugs.php.net/?id=48385&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48385&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48385&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48385&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48385&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48385&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48385&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48385&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48385&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48385&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48385&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48385&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48385&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48385&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48385&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48385&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48385&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48385&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48385&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48385&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48385&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48385&r=mysqlcfg