Skip to content

Instantly share code, notes, and snippets.

@chregu
Created February 1, 2011 11:56
Show Gist options
  • Save chregu/805759 to your computer and use it in GitHub Desktop.
Save chregu/805759 to your computer and use it in GitHub Desktop.
diff --git a/vendor/twig/lib/Twig/Template.php b/vendor/twig/lib/Twig/Template.php
index e53cf96..93343b8 100644
--- a/vendor/twig/lib/Twig/Template.php
+++ b/vendor/twig/lib/Twig/Template.php
@@ -278,6 +278,12 @@ abstract class Twig_Template implements Twig_TemplateInterface
} elseif (isset(self::$cache[$class]['methods']['__call'])) {
$method = $item;
} else {
+ if ($parent = $object->getParent($arguments)) {
+ if ($ret = $parent->getAttribute($parent,$item,$arguments,$type,$noStrictCheck,$line)) {
+ return $ret;
+ }
+ }
+
if (!$this->env->isStrictVariables() || $noStrictCheck) {
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment