Check if config/template file is actually readable before further processing
This commit is contained in:
parent
a137d72351
commit
c6bbecf0bb
@ -60,7 +60,7 @@ class FilesystemLoader extends Loader
|
||||
|
||||
$logs = array();
|
||||
foreach ($this->templatePathPatterns as $templatePathPattern) {
|
||||
if (is_file($file = strtr($templatePathPattern, $replacements))) {
|
||||
if (is_file($file = strtr($templatePathPattern, $replacements)) && is_readable($file)) {
|
||||
if (null !== $this->debugger) {
|
||||
$this->debugger->log(sprintf('Loaded template file "%s"', $file));
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ class Yaml
|
||||
$file = '';
|
||||
|
||||
// if input is a file, process it
|
||||
if (strpos($input, "\n") === false && is_file($input)) {
|
||||
if (strpos($input, "\n") === false && is_file($input) && is_readable($input)) {
|
||||
$file = $input;
|
||||
|
||||
ob_start();
|
||||
|
Reference in New Issue
Block a user