Add missing Smarty getErrorUnassigned/setErrorUnassigned methods

Fixes #979
This commit is contained in:
Simon Wisselink
2024-04-03 09:43:09 +02:00
parent baa83541d9
commit 768acd96fa
2 changed files with 17 additions and 0 deletions

1
changelog/979.md Normal file
View File

@@ -0,0 +1 @@
- Fixed missing Smarty getErrorUnassigned/setErrorUnassigned methods [#979](https://github.com/smarty-php/smarty/issues/979)

View File

@@ -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;
}
}