mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-01 08:54:26 +02:00
Fix warning when calling hasVariable for an undefined variable
Fixes #977
This commit is contained in:
1
changelog/977.md
Normal file
1
changelog/977.md
Normal file
@@ -0,0 +1 @@
|
||||
- Fix warning when calling hasVariable for an undefined variable [#977](https://github.com/smarty-php/smarty/issues/977)
|
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user