prevent regression around presence or absence of en.json

it gets excluded in the release archive, it's absence should not make
any difference
This commit is contained in:
El RIDO 2023-12-18 21:45:26 +01:00
parent 0a7a341fda
commit d49be80ffb
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
2 changed files with 52 additions and 2 deletions

View file

@ -315,10 +315,10 @@ class I18n
*/
protected static function _getPath($file = '')
{
if (strlen(self::$_path) == 0) {
if (empty(self::$_path)) {
self::$_path = PUBLIC_PATH . DIRECTORY_SEPARATOR . 'i18n';
}
return self::$_path . (strlen($file) ? DIRECTORY_SEPARATOR . $file : '');
return self::$_path . (empty($file) ? '' : DIRECTORY_SEPARATOR . $file);
}
/**