You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While upgrading to Smarty 5 I encountered this fatal error by calling this: $this->smarty->setErrorUnassigned(true);
Not a big deal, the property is still there and I can set it directly like this: $this->smarty->error_unassigned = true;
However the upgrade docs do not mention this. So I'm wondering are the getter/setter removed intentionally and the docs are missing some API method changes? Or should setErrorUnassigned() still work?
The text was updated successfully, but these errors were encountered:
Wow, after inspecting the code, I was going to say that setErrorUnassigned does not exist in Smarty 4 either. But even though it is not defined, calling $this->smarty->setErrorUnassigned(true); indeed actually works. It seems to be routed through \Smarty_Internal_Extension_Handler::_callExternalMethod() which magically allows you to get/set Smarty properties.
I cannot find any reference of setErrorUnassigned in the documentation or anywhere else on the internet, so it seems you guessed this one by accident? I'm wondering what to do about this. Adding a getter/setter seems the easiest fix. And documenting it. But there might be more magic getters/setters to consider.
I'm using this setter since Smarty 3.0 RC4. It always worked.
If this is no longer intended, I can migrate to set the property directly. It would be just nice to have a hint in the docs about the removed magic setters/getters in general.
While upgrading to Smarty 5 I encountered this fatal error by calling this:
$this->smarty->setErrorUnassigned(true);
Not a big deal, the property is still there and I can set it directly like this:
$this->smarty->error_unassigned = true;
However the upgrade docs do not mention this. So I'm wondering are the getter/setter removed intentionally and the docs are missing some API method changes? Or should
setErrorUnassigned()
still work?The text was updated successfully, but these errors were encountered: