#46317 [Asn]: Error handling in ArrayObject constructor
ID: 46317
User updated by: zoe dot slattery at googlemail dot com
Reported By: zoe dot slattery at googlemail dot com
Status: Assigned
Bug Type: SPL related
Operating System: Linux
PHP Version: 5.3CVS-2008-10-16 (snap)
Assigned To: colder
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2008-10-16 16:01:06] 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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46317&edit=1
Thread (4 messages)