Skip to content

Commit

Permalink
Add missing Smarty getErrorUnassigned/setErrorUnassigned methods
Browse files Browse the repository at this point in the history
Fixes #979
  • Loading branch information
wisskid committed Apr 3, 2024
1 parent baa8354 commit 768acd9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/979.md
@@ -0,0 +1 @@
- Fixed missing Smarty getErrorUnassigned/setErrorUnassigned methods [#979](https://github.com/smarty-php/smarty/issues/979)
16 changes: 16 additions & 0 deletions src/Smarty.php
Expand Up @@ -2228,5 +2228,21 @@ private function returnOrCreateTemplate($template, $cache_id = null, $compile_id
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;
}

}

0 comments on commit 768acd9

Please sign in to comment.