projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e23984
)
CRM_Utils_File::findFiles() - Fail gracefully if directory doesn't exist
author
Tim Otten
<totten@civicrm.org>
Mon, 8 Feb 2016 22:32:15 +0000
(22:32 +0000)
committer
Tim Otten
<totten@civicrm.org>
Mon, 8 Feb 2016 22:32:15 +0000
(22:32 +0000)
CRM/Utils/File.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Utils/File.php
b/CRM/Utils/File.php
index f869d7604ef9f592331d2a0c10844ff7f0875989..1e17d78e8007eb57042a040010ffc70e80c31606 100644
(file)
--- a/
CRM/Utils/File.php
+++ b/
CRM/Utils/File.php
@@
-663,6
+663,9
@@
HTACCESS;
* @return array(string)
*/
public static function findFiles($dir, $pattern, $relative = FALSE) {
+ if (!is_dir($dir)) {
+ return array();
+ }
$dir = rtrim($dir, '/');
$todos = array($dir);
$result = array();