summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Wisselink <wisskid@users.noreply.github.com>2024-03-29 23:32:49 +0100
committerGitHub <noreply@github.com>2024-03-29 23:32:49 +0100
commit3232277bc526602801225ac4fbc7aae3867f582e (patch)
treeb9998cf9422d76478bf041d0c4fd9e31828efbde /src
parentbbd09c7bfaa6c2c091adc4568a944f765bb4f1d9 (diff)
downloadsmarty-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.php2
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);
}
/**