diff options
| author | Simon Wisselink <wisskid@users.noreply.github.com> | 2024-03-29 23:32:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-29 23:32:49 +0100 |
| commit | 3232277bc526602801225ac4fbc7aae3867f582e (patch) | |
| tree | b9998cf9422d76478bf041d0c4fd9e31828efbde /src | |
| parent | bbd09c7bfaa6c2c091adc4568a944f765bb4f1d9 (diff) | |
| download | smarty-3232277bc526602801225ac4fbc7aae3867f582e.tar.gz smarty-3232277bc526602801225ac4fbc7aae3867f582e.tar.bz2 smarty-3232277bc526602801225ac4fbc7aae3867f582e.zip | |
Fix warning when calling hasVariable for an undefined variable (#978)
Fixes #977
Diffstat (limited to 'src')
| -rw-r--r-- | src/Data.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Data.php b/src/Data.php index 582ee660..3bb7814d 100644 --- a/src/Data.php +++ b/src/Data.php @@ -290,7 +290,7 @@ class Data * @return bool */ public function hasVariable($varName): bool { - return !($this->getVariable($varName) instanceof UndefinedVariable); + return !($this->getVariable($varName, true, false) instanceof UndefinedVariable); } /** |
