|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60643 wrong type for SplObjectStorage::GetHash
Submitted: 2012-01-03 16:03 UTC Modified: 2012-06-22 20:51 UTC
From: jthijssen at noxlogic dot nl Assigned: salathe (profile)
Status: Closed Package: SPL related
PHP Version: 5.4.0RC4 OS:
Private report: No CVE-ID: None
 [2012-01-03 16:03 UTC] jthijssen at noxlogic dot nl
The SplObjectStorage::GetHash suggests that $object is of type 'string', while in fact, this should be type 'object', as suggested in the code.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-24 17:55 UTC] kissifrot at gmail dot com
Can you give a reproduce code ?
 [2012-03-05 18:32 UTC] jthijssen at noxlogic dot nl

$store = new SplObjectStorage();
$obj = new StdClass();

print $store->getHash($obj);
print $store->getHash("obj");

Warning: SplObjectStorage::getHash() expects parameter 1 to be object, string given in /home/jthijssen/php-src/sapi/cli/test.php on line 9
 [2012-04-27 23:19 UTC]
-Assigned To: +Assigned To: salathe
 [2012-06-22 20:49 UTC]
Automatic comment from SVN on behalf of salathe
Log: minor improvements for SplObjectStorage::getHash() (doc #60643)
 [2012-06-22 20:51 UTC]
The type hint for the $object parameter has been updated, as well has a few other 
small changes for that page.  Thanks!
 [2012-06-22 20:51 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 17 13:03:33 2021 UTC