From: Roland Häder Date: Wed, 2 Dec 2020 01:08:24 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=303d853c3d98734f9d7a1a0445c98b6d6c444945;p=core.git Continued: - wrong parameters. that's also why more unit tests are required, including false-tests Signed-off-by: Roland Häder --- 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