- enhancement allow access to properties of registered opjects for Smarty2 BC (forum topic 24344)

This commit is contained in:
Uwe.Tews@googlemail.com
2013-07-27 10:06:43 +00:00
parent e62dcaa6a9
commit 6851c57ef8

View File

@@ -525,8 +525,8 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
// test if allowed methodes callable
if (!empty($allowed)) {
foreach ((array) $allowed as $method) {
if (!is_callable(array($object_impl, $method))) {
throw new SmartyException("Undefined method '$method' in registered object");
if (!is_callable(array($object_impl, $method)) && !property_exists($object_impl, $method)) {
throw new SmartyException("Undefined method or property '$method' in registered object");
}
}
}