mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
Fix unconsistent behavior with "get" and "is"
This commit is contained in:
committed by
Fabien Potencier
parent
ed6e8972ac
commit
8fb35d5fd4
@@ -604,6 +604,9 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|||||||
} else {
|
} else {
|
||||||
$methods = get_class_methods($object);
|
$methods = get_class_methods($object);
|
||||||
}
|
}
|
||||||
|
// sort values to have consistent behavior, so that "get" methods win precedence over "is" methods
|
||||||
|
sort($methods);
|
||||||
|
|
||||||
$cache = array();
|
$cache = array();
|
||||||
|
|
||||||
foreach ($methods as $method) {
|
foreach ($methods as $method) {
|
||||||
|
|||||||
Reference in New Issue
Block a user