Allow to find files where file extension is not important
authorRoland Häder <roland@mxchange.org>
Wed, 24 Apr 2013 02:47:56 +0000 (02:47 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 24 Apr 2013 02:47:56 +0000 (02:47 +0000)
inc/functions.php

index 45ef7fc..c227a23 100644 (file)
@@ -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);
                }