| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 Patchesfix-exceptionmsg-cachingitctor (last revision 2014-08-09 14:34 UTC by tim_siebels_aurich at yahoo dot de)Pull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2014-08-11 09:51 UTC] [email protected]
  [2014-08-11 09:51 UTC] [email protected]
 
-Status: Open
+Status: Closed
  [2014-08-11 09:51 UTC] [email protected]
  [2014-08-11 09:51 UTC] [email protected]
  [2014-08-12 10:47 UTC] [email protected]
  [2014-08-14 00:52 UTC] [email protected]
  | 
    |||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 07:00:01 2025 UTC | 
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