From d07d7b355ca97875496e6ce97db85a910e3a3732 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 1 Jul 2015 16:30:23 +0200 Subject: [PATCH] Control: *global* snippet changed from NULL to \0 to be distinguished from '' --- src/Application/UI/Control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application/UI/Control.php b/src/Application/UI/Control.php index 7e4f65f84..4d17ec43a 100644 --- a/src/Application/UI/Control.php +++ b/src/Application/UI/Control.php @@ -107,7 +107,7 @@ public function flashMessage($message, $type = 'info') public function redrawControl($snippet = NULL, $redraw = TRUE) { if ($redraw) { - $this->invalidSnippets[$snippet] = TRUE; + $this->invalidSnippets[$snippet === NULL ? "\0" : $snippet] = TRUE; } elseif ($snippet === NULL) { $this->invalidSnippets = []; @@ -162,7 +162,7 @@ public function isControlInvalid($snippet = NULL) } } else { - return isset($this->invalidSnippets[NULL]) || isset($this->invalidSnippets[$snippet]); + return isset($this->invalidSnippets["\0"]) || isset($this->invalidSnippets[$snippet]); } }