Doc #54118 [Opn->Csd]: splobjectstorage::offsetset

From: Date: Tue, 01 Mar 2011 10:23:07 +0000
Subject: Doc #54118 [Opn->Csd]: splobjectstorage::offsetset
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-6038@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54118&edit=1 ID: 54118 Updated by: rquadling@php.net Reported by: lsmith@php.net Summary: splobjectstorage::offsetset -Status: Open +Status: Closed Type: Documentation Problem Package: SPL related PHP Version: Irrelevant -Assigned To: +Assigned To: rquadling Block user comment: N Private report: N New Comment: 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 http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-03-01 01:13:25] felipe@php.net Automatic comment from SVN on behalf of felipe Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=308784 Log: - Fixed SplObjectStorage::offsetSet arginfo, reported in bug #54118 ------------------------------------------------------------------------ [2011-02-28 12:56:32] rquadling@php.net The following patch has been added/updated: Patch Name: SPLObjectStorage_offsetSet_Reflection Revision: 1298894192 URL: http://bugs.php.net/patch-display.php?bug=54118&patch=SPLObjectStorage_offsetSet_Reflection&revision=1298894192 ------------------------------------------------------------------------ [2011-02-28 12:55:41] rquadling@php.net 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 11:55:03] lsmith@php.net Description: ------------ The second parameter is optional: http://php.net/manual/en/splobjectstorage.offsetset.php Test script: --------------- [11:50] <lsmith> http://ch2.php.net/manual/en/splobjectstorage.offsetset.php [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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54118&edit=1

« previous php.doc.bugs (#6038) next »