Merge pull request #1220 from PrivateBin/en-default-test

prevent regression around presence or absence of en.json
This commit is contained in:
El RIDO
2023-12-23 13:06:05 +01:00
committed by GitHub
2 changed files with 52 additions and 2 deletions
+2 -2
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);
}
/**