diff --git a/includes/functions.php b/includes/functions.php index 96edcf7c6..66adadc7b 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -671,9 +671,13 @@ function isHexString($str) } # Include all .inc.php files in $dir -function include_dir($dir, $regex = "/\.inc\.php$/") +function include_dir($dir, $regex) { global $device, $config; + if ( $regex == "") + { + $regex = "/\.inc\.php$/"; + } if ($handle = opendir($config['install_dir'] . '/' . $dir)) {