From 0b72a00f56f75bb980109d6638b75ffdd010a80e Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 24 Jul 2013 10:57:33 -0700 Subject: [PATCH] CRM-13108 - CRM_Utils_File - Performance fix ---------------------------------------- * CRM-13108: Warnings when extensions is installed http://issues.civicrm.org/jira/browse/CRM-13108 --- CRM/Utils/File.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index 5d068bf18d..68b8438a95 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -529,8 +529,9 @@ HTACCESS; $result = array(); while (!empty($todos)) { $subdir = array_shift($todos); - if (is_array(glob("$subdir/$pattern"))) { - foreach (glob("$subdir/$pattern") as $match) { + $matches = glob("$subdir/$pattern"); + if (is_array($matches)) { + foreach ($matches as $match) { if (!is_dir($match)) { $result[] = $match; } -- 2.25.1