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