1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Ensure the Lang class always exists when throwing exceptions

This commit is contained in:
J. King 2018-10-31 14:32:11 -04:00
parent d40243a84c
commit 9e6f0460c2

View file

@ -93,7 +93,7 @@ abstract class AbstractException extends \Exception {
$code = self::CODES[$codeID];
$msg = "Exception.".str_replace("\\", "/", $class).".$msgID";
}
$msg = Arsse::$lang->msg($msg, $vars);
$msg = (Arsse::$lang ?? new Lang)->msg($msg, $vars);
}
parent::__construct($msg, $code, $e);
}