Navigation Menu

Skip to content

Commit

Permalink
[Templating] changed filesystem loader to only logged failed paths wh…
Browse files Browse the repository at this point in the history
…en not able to load the template
  • Loading branch information
fabpot committed Jan 29, 2010
1 parent d372ae8 commit e1aae4b
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -66,6 +66,7 @@ public function load($template, array $options = array())
$replacements['%'.$key.'%'] = $value;
}

$logs = array();
foreach ($this->templatePathPatterns as $templatePathPattern)
{
if (is_file($file = strtr($templatePathPattern, $replacements)))
Expand All @@ -80,10 +81,15 @@ public function load($template, array $options = array())

if ($this->debugger)
{
$this->debugger->log(sprintf('Failed loading template file "%s" (renderer: %s)', $file, $options['renderer']));
$logs[] = sprintf('Failed loading template file "%s" (renderer: %s)', $file, $options['renderer']);
}
}

foreach ($logs as $log)
{
$this->debugger->log($log);
}

return false;
}

Expand Down

0 comments on commit e1aae4b

Please sign in to comment.