Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

979 set error unassigned #982

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/972.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix Smarty::assign() not returning $this when called with an array as first parameter [#972](https://github.com/smarty-php/smarty/pull/972)
1 change: 1 addition & 0 deletions changelog/979.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed missing Smarty getErrorUnassigned/setErrorUnassigned methods [#979](https://github.com/smarty-php/smarty/issues/979)
2 changes: 1 addition & 1 deletion make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ php utilities/update-smarty-version-number.php $1
git add changelog CHANGELOG.md src/Smarty.php
git commit -m "version bump"

git checkout master
git checkout support/5
git pull
git merge --no-ff "release/$1"
git branch -d "release/$1"
Expand Down
17 changes: 16 additions & 1 deletion src/Smarty.php
Original file line number Diff line number Diff line change
Expand Up @@ -2227,6 +2227,22 @@ private function returnOrCreateTemplate($template, $cache_id = null, $compile_id
}

/**
* 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;
}

/**
* Sets if Smarty should check If-Modified-Since headers to determine cache validity.
* @param bool $cache_modified_check
* @return void
Expand All @@ -2236,4 +2252,3 @@ public function setCacheModifiedCheck($cache_modified_check): void {
}

}

Loading