Bug #67813 [Opn->Csd]: CachingIterator::__construct InvalidArgumentException wrong message

From: Date: Mon, 11 Aug 2014 09:51:08 +0000
Subject: Bug #67813 [Opn->Csd]: CachingIterator::__construct InvalidArgumentException wrong message
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187068@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67813&edit=1 ID: 67813 Updated by: laruence@php.net Reported by: tim_siebels_aurich at yahoo dot de Summary: CachingIterator::__construct InvalidArgumentException wrong message -Status: Open +Status: Closed Type: Bug Package: SPL related Operating System: any PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=b6ddcf9c7176f6cca06804c747c08bee89980e44 Log: Fixed bug #67813 (CachingIterator::__construct InvalidArgumentException wrong message) Previous Comments: ------------------------------------------------------------------------ [2014-08-09 14:31:50] tim_siebels_aurich at yahoo dot de Description: ------------ Creating a new CachingIterator with invalid flags throws an InvalidArgumentException. The message however is wrong and does not match setFlags. It says TOSTRING_USE_CURRENT twice. Test script: --------------- <?php try { new CachingIterator(new ArrayIterator([]), 3); } catch (Exception $e) { echo $e->getMessage(); } Expected result: ---------------- Flags must contain only one of CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT, TOSTRING_USE_INNER Actual result: -------------- Flags must contain only one of CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT, TOSTRING_USE_CURRENT ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67813&edit=1

« previous php.bugs (#187068) next »