php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46317 Error handling in ArrayObject constructor
Submitted: 2008-10-16 16:01 UTC Modified: 2008-10-19 18:00 UTC
From: zoe dot slattery at googlemail dot com Assigned: colder (profile)
Status: Closed Package: SPL related
PHP Version: 5.3CVS-2008-10-16 (snap) OS: Linux
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: zoe dot slattery at googlemail dot com
New email:
PHP Version: OS:

 

 [2008-10-16 16:01 UTC] zoe dot slattery at googlemail dot com
Description:
------------
Errors are in the ArrayObject constructor are handled differently between PHP53 and PHP6. I believe that the PHP6 behaviour is better.

Reproduce code:
---------------
The test case is here:http://www.pastebin.ca/1228409

Expected result:
----------------
The PHP53 result is in the --EXPECT-- section of the test case.



Actual result:
--------------
The actual result on PHP6 is:

Bad iterator type:
ArrayObject::__construct() expects parameter 3 to be a class name derived from Iterator, 'Exception' given(6)
Non-existent class:
ArrayObject::__construct() expects parameter 3 to be a class name derived from Iterator, 'nonExistentClassName' given(13)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-17 14:47 UTC] zoe dot slattery at googlemail dot com
Hi
I committed the tests that relate to this. They currently have an --XFAIL-- section in the PHP 5.2 and PHP5.3 versions of the tests.

The tests are in ext/spl/tests and are called:
arrayObject___construct_error1.phpt
arrayObject_setIteratorClass_error1.phpt

they both reference this bug number.
 [2008-10-19 18:00 UTC] colder@php.net
This bug has been fixed in CVS.

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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 11:01:30 2024 UTC