// 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) || (empty($extension))) {
+ } elseif ((($fileExtension == $extension) || (empty($extension))) && (isFileReadable($FQFN))) {
// Other, generic file found
if ($addBaseDir === TRUE) {
// With base path
$baseName = basename($FQFN);
// Check it
- $GLOBALS[__FUNCTION__][$FQFN] = ((is_dir($FQFN)) && ($baseName != '.') && ($baseName != '..') && ($baseName != '.svn'));
+ $GLOBALS[__FUNCTION__][$FQFN] = ((is_dir($FQFN)) && (!in_array($baseName, array('.', '..', '.svn'))));
} // END - if
// Return the result