We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e89bc0b commit 3748987Copy full SHA for 3748987
cake/libs/folder.php
@@ -212,17 +212,18 @@ function findRecursive($pattern = '.*', $sort = false) {
212
*/
213
function _findRecursive($pattern, $sort = false) {
214
list($dirs, $files) = $this->read($sort);
215
-
216
$found = array();
+
217
foreach ($files as $file) {
218
if (preg_match('/^' . $pattern . '$/i', $file)) {
219
$found[] = Folder::addPathElement($this->path, $file);
220
}
221
222
$start = $this->path;
223
224
foreach ($dirs as $dir) {
225
$this->cd(Folder::addPathElement($start, $dir));
- $found = array_merge($found, $this->findRecursive($pattern));
226
+ $found = array_merge($found, $this->findRecursive($pattern, $sort));
227
228
return $found;
229
0 commit comments