[WebBundle] Fixed php notice error when template name is not valid

This commit is contained in:
Fabien Pennequin 2010-06-20 20:51:08 +02:00 committed by Fabien Potencier
parent 2a2ed30b87
commit 97fa85477c
1 changed files with 4 additions and 0 deletions

4
src/Symfony/Framework/WebBundle/Templating/Engine.php Normal file → Executable file
View File

@ -123,6 +123,10 @@ class Engine extends BaseEngine
{
$parts = explode(':', $name, 4);
if (sizeof($parts) < 3) {
throw new \InvalidArgumentException(sprintf('Template name "%s" is not valid.', $name));
}
$options = array_replace(
array(
'renderer' => 'php',