mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- enhancement allow access to properties of registered opjects for Smarty2 BC (forum topic 24344)
This commit is contained in:
@@ -525,8 +525,8 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
|
|||||||
// test if allowed methodes callable
|
// test if allowed methodes callable
|
||||||
if (!empty($allowed)) {
|
if (!empty($allowed)) {
|
||||||
foreach ((array) $allowed as $method) {
|
foreach ((array) $allowed as $method) {
|
||||||
if (!is_callable(array($object_impl, $method))) {
|
if (!is_callable(array($object_impl, $method)) && !property_exists($object_impl, $method)) {
|
||||||
throw new SmartyException("Undefined method '$method' in registered object");
|
throw new SmartyException("Undefined method or property '$method' in registered object");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user