Skip to content

Commit

Permalink
Use is_dir() to check for directories
Browse files Browse the repository at this point in the history
Request: 14689
Signed-off-by: Jan Schneider <jan@horde.org>
  • Loading branch information
thomasjfox authored and yunosh committed Sep 25, 2017
1 parent d70680d commit a4426c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/Translation/lib/Horde/Translation/Autodetect.php
Expand Up @@ -64,14 +64,14 @@ protected static function _searchLocaleDirectory()
{
if (static::$_pearDirectory !== '@data_dir@') {
$directory = static::$_pearDirectory . '/' . static::$_domain . '/locale';
if (file_exists($directory)) {
if (is_dir($directory)) {
return $directory;
}
}

$directories = static::_getSearchDirectories();
foreach ($directories as $directory) {
if (file_exists($directory)) {
if (is_dir($directory)) {
return $directory;
}
}
Expand Down

0 comments on commit a4426c8

Please sign in to comment.