]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 2 Dec 2020 01:08:24 +0000 (02:08 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 2 Dec 2020 01:08:24 +0000 (02:08 +0100)
- wrong parameters. that's also why more unit tests are required, including
  false-tests

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/main/classes/language/class_LanguageSystem.php

index ebcfc38e6e1a0cae8bd7fc90c10f4800294ef053..c8cc07a08309ea3f48ac2b95a158e5b9fb05d342 100644 (file)
@@ -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