|
|
@ -115,7 +115,7 @@ final class Config {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!in_array($var, self::$deprecated_options)) {
|
|
|
|
if (!in_array($var, self::$deprecated_options)) {
|
|
|
|
error_log('Config::read(): attempt to read undefined config option "' . $var . '", returning null');
|
|
|
|
error_log('Config::read(): attempt to read undefined config option "' . $var . '", returning null' . json_encode(debug_backtrace(), true));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
@ -198,15 +198,15 @@ final class Config {
|
|
|
|
* @access public
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static function lang($var) {
|
|
|
|
public static function lang($var) {
|
|
|
|
$value = self::read("__LANG.{$var}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (is_null($value)) {
|
|
|
|
$languages = self::read_array('__LANG');
|
|
|
|
return '';
|
|
|
|
|
|
|
|
}
|
|
|
|
$value = $languages[$var] ?? '';
|
|
|
|
|
|
|
|
|
|
|
|
if (!is_string($value)) {
|
|
|
|
if (!is_string($value)) {
|
|
|
|
trigger_error('In ' . __FUNCTION__ . ": expected config $var to be a string , but received a " . gettype($value), E_USER_ERROR);
|
|
|
|
trigger_error('In ' . __FUNCTION__ . ": expected config $var to be a string , but received a " . gettype($value), E_USER_ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $value;
|
|
|
|
return $value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|