[WebBundle] Fixed php notice error when template name is not valid
This commit is contained in:
parent
2a2ed30b87
commit
97fa85477c
4
src/Symfony/Framework/WebBundle/Templating/Engine.php
Normal file → Executable file
4
src/Symfony/Framework/WebBundle/Templating/Engine.php
Normal file → Executable file
@ -123,6 +123,10 @@ class Engine extends BaseEngine
|
|||||||
{
|
{
|
||||||
$parts = explode(':', $name, 4);
|
$parts = explode(':', $name, 4);
|
||||||
|
|
||||||
|
if (sizeof($parts) < 3) {
|
||||||
|
throw new \InvalidArgumentException(sprintf('Template name "%s" is not valid.', $name));
|
||||||
|
}
|
||||||
|
|
||||||
$options = array_replace(
|
$options = array_replace(
|
||||||
array(
|
array(
|
||||||
'renderer' => 'php',
|
'renderer' => 'php',
|
||||||
|
Reference in New Issue
Block a user