From c6625c077b9093fc7496586c4c2091e7f3727573 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 31 Dec 2011 13:14:29 +0100 Subject: [PATCH] Fixes bug in I18nHandler::validateValues() If a plain value is validated there are two errors possible: 1. The value has to be a I18n value, but isn't it. 2. The plain value is empty. So, when checking, there need to be an `or` instead of an `and`. --- .../install/files/lib/system/language/I18nHandler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php index 1f75c7c992..504b541891 100644 --- a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php +++ b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php @@ -126,7 +126,7 @@ class I18nHandler extends SingletonFactory { */ public function validateValue($elementID, $requireI18n) { if ($this->isPlainValue($elementID)) { - if ($requireI18n && $this->getValue($elementID) == '') { + if ($requireI18n || $this->getValue($elementID) == '') { return false; } } -- 2.20.1