From 0c121cf4fe095d80fc9173c58cea716436ce8e24 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 1 Nov 2015 00:54:43 +0100 Subject: [PATCH] CustomVariableString: immediate false for non-strings --- library/Director/CustomVariable/CustomVariableString.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Director/CustomVariable/CustomVariableString.php b/library/Director/CustomVariable/CustomVariableString.php index ab14e77a..fdd73804 100644 --- a/library/Director/CustomVariable/CustomVariableString.php +++ b/library/Director/CustomVariable/CustomVariableString.php @@ -8,6 +8,10 @@ class CustomVariableString extends CustomVariable { public function equals(CustomVariable $var) { + if (! $var instanceof CustomVariableString) { + return false; + } + return $var->getValue() === $this->getValue(); }