|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesothermask.patch (last revision 2012-01-13 12:44 UTC by jthijssen at noxlogic dot nl)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-02-04 16:10 UTC] colder@php.net
-Assigned To:
+Assigned To: colder
[2012-03-19 21:39 UTC] jthijssen at noxlogic dot nl
[2012-03-19 22:47 UTC] johannes@php.net
-Status: Assigned
+Status: Closed
-Assigned To: colder
+Assigned To: dsp
[2012-03-19 22:47 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 17:00:01 2025 UTC |
Description: ------------ The FileSystemIterator defines a few constants to mask its flags: CURRENT_MODE_MASK and KEY_MODE_MASK. However, there are other flags (SKIP_DOTS and UNIX_PATHS) which cannot be masked of by a constant. However, internally, there is a mask constant defined (SPL_FILE_DIR_OTHERS_MASK). It makes sense that this value is also known in PHP userland by the OTHER_MODE_MASK constant. The attached patch adds this constant and is compatible with trunk, php_5_4 and php_5_3 branches. Test script: --------------- <?php $it = new fileSystemIterator(".", FileSystemIterator::SKIP_DOTS | FileSystemIterator::CURRENT_AS_SELF); $masked_flags = ($it->getFlags() & FileSystemIterator::OTHER_MODE_MASK); print $masked_flags; Expected result: ---------------- 4096 Actual result: -------------- PHP Notice: Use of undefined constant OTHER_MODE_MASK - assumed 'OTHER_MODE_MASK'