----------------------------------------
* CRM-13108: Warnings when extensions is installed
http://issues.civicrm.org/jira/browse/CRM-13108
$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;
}