added a missing deprecation notice

This commit is contained in:
Fabien Potencier
2016-09-24 11:30:39 -07:00
parent bba5e1a1b3
commit 9c2747996a
+4
View File
@@ -213,6 +213,10 @@ class Twig_Node implements Twig_NodeInterface
*/
public function setNode($name, $node = null)
{
if (!$node instanceof Twig_NodeInterface) {
@trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', is_object($node) ? get_class($node) : null === $node ? 'null' : gettype($node), $name, get_class($this)), E_USER_DEPRECATED);
}
$this->nodes[$name] = $node;
}