GettextTranslationHelper: Avoid descending into symlinks

This basically avoids loops...

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
Markus Frosch 2017-10-13 13:47:21 +02:00 committed by Eric Lippmann
parent 43423f9453
commit 389b23af81
1 changed files with 1 additions and 1 deletions

View File

@ -473,7 +473,7 @@ class GettextTranslationHelper
$filepath = $directory . DIRECTORY_SEPARATOR . $filename;
if (preg_match('@^[^\.].+\.(' . implode('|', $this->sourceExtensions) . ')$@', $filename)) {
$file->fwrite($filepath . PHP_EOL);
} elseif (is_dir($filepath)) {
} elseif (! is_link($filepath) && is_dir($filepath)) {
$subdirs[] = $filepath;
}
}