mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 11:56:50 +00:00
fixed error message
This commit is contained in:
@@ -950,7 +950,7 @@ class Twig_Environment
|
||||
public function addFilter($name, $filter = null)
|
||||
{
|
||||
if (!$name instanceof Twig_SimpleFilter && !($filter instanceof Twig_SimpleFilter || $filter instanceof Twig_FilterInterface)) {
|
||||
throw new LogicException('A filter must be an instance of Twig_FilterInterface or Twig_SimpleFilter');
|
||||
throw new LogicException('A filter must be an instance of Twig_FilterInterface or Twig_SimpleFilter.');
|
||||
}
|
||||
|
||||
if ($name instanceof Twig_SimpleFilter) {
|
||||
|
||||
+1
-1
@@ -373,7 +373,7 @@ class Twig_Parser implements Twig_ParserInterface
|
||||
(!$node instanceof Twig_Node_Text && !$node instanceof Twig_Node_BlockReference && $node instanceof Twig_NodeOutputInterface)
|
||||
) {
|
||||
if (false !== strpos((string) $node, chr(0xEF).chr(0xBB).chr(0xBF))) {
|
||||
throw new Twig_Error_Syntax('A template that extends another one cannot start with a byte order mark (BOM); it must be removed', $node->getLine(), $this->getFilename());
|
||||
throw new Twig_Error_Syntax('A template that extends another one cannot start with a byte order mark (BOM); it must be removed.', $node->getLine(), $this->getFilename());
|
||||
}
|
||||
|
||||
throw new Twig_Error_Syntax('A template that extends another one cannot include contents outside Twig blocks. Did you forget to put the contents inside a {% block %} tag?', $node->getLine(), $this->getFilename());
|
||||
|
||||
@@ -431,7 +431,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist', $item), -1, $this->getTemplateName());
|
||||
throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist.', $item), -1, $this->getTemplateName());
|
||||
}
|
||||
|
||||
return $context[$item];
|
||||
@@ -579,7 +579,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Twig_Error_Runtime(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s"', $item, get_class($object)), -1, $this->getTemplateName());
|
||||
throw new Twig_Error_Runtime(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, get_class($object)), -1, $this->getTemplateName());
|
||||
}
|
||||
|
||||
if ($isDefinedTest) {
|
||||
|
||||
Reference in New Issue
Block a user