Skip to content

Commit

Permalink
Revert "Merge branch 'luciferous-master' into dev"
Browse files Browse the repository at this point in the history
This reverts commit 9202a37, reversing
changes made to 54b5800.

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
  • Loading branch information
bobthecow committed Oct 30, 2010
1 parent 9202a37 commit 35c7250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mustache.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ protected function _getVariable($tag_name) {
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;
Expand Down

0 comments on commit 35c7250

Please sign in to comment.