#48667 [Com]: "could not implement" - NOT redefining functions
| From: | admin at somesite dot de | Date: | Wed, 26 Aug 2009 12:29:11 +0000 |
| Subject: | #48667 [Com]: "could not implement" - NOT redefining functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-141549@lists.php.net to get a copy of this message | ||
ID: 48667
Comment by: admin at somesite dot de
Reported By: uramihsayibok at gmail dot com
Status: Verified
Bug Type: SPL related
Operating System: Windows XP
PHP Version: 5.2.10
New Comment:
When i set display_errors to on and display_startup_errors to on i even
get an error message window displaying the same error. according to the
taskmanager, this window is created by csrss.exe .
i use Windows XP SP2 with xampp + PHP5.3
Previous Comments:
------------------------------------------------------------------------
[2009-08-25 07:27:26] sjoerd@php.net
Reproducable and strange. Error is also not very descriptive.
------------------------------------------------------------------------
[2009-06-23 22:14:17] uramihsayibok at gmail dot com
Description:
------------
When trying to make a class that implements IteratorAggregate and SPL's
SeekableIterator the order of the interfaces in the list matters. One
order (IA first SI second) works while the other (SI first IA second)
produces a fatal error in Unknown.
THESE TWO INTERFACES ARE SEPARATE AND DISTINCT - NO FUNCTIONS IN
COMMON!
Traversable -> Iterator -> SeekableIterator
(seek,current,next,key,valid,rewind)
Traversable -> IteratorAggregate (getIterator)
I haven't been able to reproduce this with user-defined interfaces and
I haven't gone looking to see if this happens with any other built-in
interfaces.
Something to do with that fact that they redefine how iteration on a
class works?
Reproduce code:
---------------
#1 (works)
abstract class Foo1 implements IteratorAggregate, SeekableIterator {}
#2 (does not work)
abstract class Foo2 implements SeekableIterator, IteratorAggregate {}
Expected result:
----------------
#1 and #2 should both work or both not work.
In this case, work, since neither have any functions in common to
redefine.
Actual result:
--------------
#1 - okay
#2 - "Fatal error: Class Foo2 could not implement interface
IteratorAggregate in Unknown on line 0"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48667&edit=1