diff --git a/changelog/979.md b/changelog/979.md new file mode 100644 index 00000000..75eb84fe --- /dev/null +++ b/changelog/979.md @@ -0,0 +1 @@ +- Fixed missing Smarty getErrorUnassigned/setErrorUnassigned methods [#979](https://github.com/smarty-php/smarty/issues/979) \ No newline at end of file diff --git a/src/Smarty.php b/src/Smarty.php index bf1d3fad..c1381ac2 100644 --- a/src/Smarty.php +++ b/src/Smarty.php @@ -2228,5 +2228,21 @@ class Smarty extends \Smarty\TemplateBase { return $template; } + /** + * Whether Smarty displays an error when using an unassigned variable + */ + public function getErrorUnassigned(): bool + { + return (bool) $this->error_unassigned; + } + + /** + * Set if Smarty should display an error on using an unassigned variable + */ + public function setErrorUnassigned(bool $error_unassigned): void + { + $this->error_unassigned = $error_unassigned; + } + }