|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54118 splobjectstorage::offsetset
Submitted: 2011-02-28 11:55 UTC Modified: 2011-03-01 11:23 UTC
From: Assigned: rquadling (profile)
Status: Closed Package: SPL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2011-02-28 11:55 UTC]
The second parameter is optional:

Test script:
[11:50] <lsmith>
[11:50] <lsmith> so there the docs say again that the second param isnt optional
[11:50] <ekneuss> in that case it's optional yes (in the implementation)
[11:51] <ekneuss> the thing is, SplObjectStorage is a map without a need for any value
[11:51] <lsmith> ok
[11:51] <lsmith> so the docs should be fixed?
[11:51] <ekneuss> so it can be seen both as a set and a map
[11:51] <ekneuss> I guess yes
[11:51] <lsmith> ok


SPLObjectStorage_offsetSet_Reflection (last revision 2011-02-28 11:56 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-28 12:55 UTC]
-Package: Documentation problem +Package: SPL related
 [2011-02-28 12:55 UTC]
The reflection information in spl_observer.c also needs to be changed making this not just a Documentation issue.

As SPLObjectStorage::offsetSet() is an alias for SPLObjectStorage::attach(), either ...

ZEND_BEGIN_ARG_INFO_EX(arginfo_offsetSet, 0, 0, 2)

should be ...

ZEND_BEGIN_ARG_INFO_EX(arginfo_offsetSet, 0, 0, 1)

This would then make the reflection match (php --ri SPLObjectStorage)

OOI, as this is an aliases (and others exist for SPLObjectStorage), why bother with these methods having their own ARG_INFO structures at all? Just use the structure from the aliased method?
 [2011-02-28 12:56 UTC]
The following patch has been added/updated:

Patch Name: SPLObjectStorage_offsetSet_Reflection
Revision:   1298894192
 [2011-03-01 01:13 UTC]
Automatic comment from SVN on behalf of felipe
Log: - Fixed SplObjectStorage::offsetSet arginfo, reported in bug #54118
 [2011-03-01 11:23 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: rquadling
 [2011-03-01 11:23 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 01 23:05:51 2023 UTC