[WebBundle] Fixed php notice error when template name is not valid
This commit is contained in:
parent
2a2ed30b87
commit
97fa85477c
|
@ -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',
|
||||
|
|
Reference in New Issue