From 35c725089be88d7a044a109a2d9cea594b6eb1dd Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sat, 30 Oct 2010 18:06:39 -0400 Subject: [PATCH] Revert "Merge branch 'luciferous-master' into dev" This reverts commit 9202a37cf517a24b17fb554adbab5c6bfbb227bd, reversing changes made to 54b5800d420da0dea307fa79518f181f3dbe5554. Using `is_callable` is problematic as the `__call` magic method interferes with context all over the place. See http://hile.mn/buBS11 and http://hile.mn/9vy1S6 --- Mustache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mustache.php b/Mustache.php index a8abf74..4fded45 100644 --- a/Mustache.php +++ b/Mustache.php @@ -604,7 +604,7 @@ class Mustache { protected function _findVariableInContext($tag_name, $context) { foreach ($context as $view) { if (is_object($view)) { - if (is_callable(array($view, $tag_name))) { + if (method_exists($view, $tag_name)) { return $view->$tag_name(); } else if (isset($view->$tag_name)) { return $view->$tag_name;