From 303d853c3d98734f9d7a1a0445c98b6d6c444945 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 2 Dec 2020 02:08:24 +0100 Subject: [PATCH] Continued: - wrong parameters. that's also why more unit tests are required, including false-tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- framework/main/classes/language/class_LanguageSystem.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/framework/main/classes/language/class_LanguageSystem.php b/framework/main/classes/language/class_LanguageSystem.php index ebcfc38e..c8cc07a0 100644 --- a/framework/main/classes/language/class_LanguageSystem.php +++ b/framework/main/classes/language/class_LanguageSystem.php @@ -100,15 +100,12 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage, if (empty($languageBasePath)) { // Language path is empty throw new InvalidArgumentException('languageBasePath is still empty'); - } elseif (!is_string($languageBasePath)) { - // Is not a string - throw new InvalidArgumentException(array($langInstance, $languageBasePath), self::EXCEPTION_INVALID_STRING); } elseif (!is_dir($languageBasePath)) { // Is not a path - throw new InvalidArgumentException(array($langInstance, $languageBasePath), self::EXCEPTION_INVALID_PATH_NAME); + throw new InvalidArgumentException(sprintf('languageBasePath=%s not found', $languageBasePath), self::EXCEPTION_INVALID_PATH_NAME); } elseif (!is_readable($languageBasePath)) { // Is not readable - throw new InvalidArgumentException(array($langInstance, $languageBasePath), self::EXCEPTION_READ_PROTECED_PATH); + throw new InvalidArgumentException(sprintf('Cannot read from languageBasePath=%s', $languageBasePath), self::EXCEPTION_READ_PROTECED_PATH); } // Set the base path -- 2.39.5