From ab167ffb9fd77666c83648a8c750875c3402e64f Mon Sep 17 00:00:00 2001 From: DarkAngelBGE Date: Tue, 9 Sep 2008 04:39:43 +0000 Subject: [PATCH] removing unneeded code lines in Folder->find(), which will never fire according to Folder->read() git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7575 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/folder.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cake/libs/folder.php b/cake/libs/folder.php index 748d51718..848713a0f 100644 --- a/cake/libs/folder.php +++ b/cake/libs/folder.php @@ -190,20 +190,15 @@ class Folder extends Object { * @access public */ function find($regexp_pattern = '.*', $sort = false) { - $data = $this->read($sort); + list($dirs, $files) = $this->read($sort); - if (!is_array($data)) { - return array(); - } - - list($dirs, $files) = $data; $found = array(); - foreach ($files as $file) { if (preg_match("/^{$regexp_pattern}$/i", $file)) { $found[] = $file; } } + return $found; } /**