Security update for Core, with self-updated composer
[yaffs-website] / vendor / twig / twig / lib / Twig / Template.php
index 64563419ec0c17b9c2694ac05aba12c3a8b6bf9c..2042c6bcfcaf3be7814fb25b73916b69a8dd53ea 100644 (file)
@@ -568,6 +568,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
 
             if (null === $object) {
                 $message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item);
+            } elseif (is_array($object)) {
+                $message = sprintf('Impossible to invoke a method ("%s") on an array.', $item);
             } else {
                 $message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, gettype($object), $object);
             }