Bug #67813 [NEW]: CachingIterator::__construct InvalidArgumentException wrong message

From: Date: Sat, 09 Aug 2014 14:31:51 +0000
Subject: Bug #67813 [NEW]: CachingIterator::__construct InvalidArgumentException wrong message
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187049@lists.php.net to get a copy of this message
From: tim_siebels_aurich at yahoo dot de Operating system: any PHP version: Irrelevant Package: SPL related Bug Type: Bug Bug description:CachingIterator::__construct InvalidArgumentException wrong message 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 bug report at https://bugs.php.net/bug.php?id=67813&edit=1 --

« previous php.bugs (#187049) next »