From: Roland Häder Date: Wed, 24 Apr 2013 02:47:56 +0000 (+0000) Subject: Allow to find files where file extension is not important X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d1cf572ce023d55e2dbb810d1d6f9301c3d4e3db;p=mailer.git Allow to find files where file extension is not important --- diff --git a/inc/functions.php b/inc/functions.php index 45ef7fce2c..c227a23925 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1865,7 +1865,7 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = FALSE, $ad // We found .php file but should not search for them, why? reportBug(__FUNCTION__, __LINE__, 'We should find files with extension=' . $extension . ', but we found a PHP script. (baseFile=' . $baseFile . ')'); } - } elseif ($fileExtension == $extension) { + } elseif (($fileExtension == $extension) || (empty($extension))) { // Other, generic file found array_push($foundMatches, $fileName); }