X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseObject.php;h=4a6fa12d24b03ad18f4542114f1302d8a9e3573e;hb=a73235b6eee32f41895eb5d4098e40d6a363caaf;hp=6b64daccf0d8dbbd3bc47d75cd7964db0fbc8e28;hpb=71ec84f6dc83f753fe80170cfdfd32d202850d90;p=friendica.git diff --git a/src/BaseObject.php b/src/BaseObject.php index 6b64daccf0..4a6fa12d24 100644 --- a/src/BaseObject.php +++ b/src/BaseObject.php @@ -6,6 +6,8 @@ namespace Friendica; require_once 'boot.php'; +use Friendica\Network\HTTPException\InternalServerErrorException; + /** * Basic object * @@ -21,11 +23,12 @@ class BaseObject * Same as get_app from boot.php * * @return App + * @throws \Exception */ public static function getApp() { if (empty(self::$app)) { - self::$app = new App(dirname(__DIR__)); + throw new InternalServerErrorException('App isn\'t initialized.'); } return self::$app; @@ -34,7 +37,7 @@ class BaseObject /** * Set the app * - * @param object $app App + * @param App $app App * * @return void */