X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseObject.php;h=9a2d064750b7d74ca13bc17fd2473323cf3298f8;hb=a85aa24d56e0aa0217529aaad9829ec6e7a2bc2e;hp=d006c249defde79fc07243794a13d61ade733a8e;hpb=2f49c4a0586610c3a89b6342a90b916b95719d10;p=friendica.git diff --git a/src/BaseObject.php b/src/BaseObject.php index d006c249de..9a2d064750 100644 --- a/src/BaseObject.php +++ b/src/BaseObject.php @@ -4,7 +4,9 @@ */ namespace Friendica; -require_once 'boot.php'; +require_once __DIR__ . '/../boot.php'; + +use Friendica\Network\HTTPException\InternalServerErrorException; /** * Basic object @@ -13,6 +15,9 @@ require_once 'boot.php'; */ class BaseObject { + /** + * @var App + */ private static $app = null; /** @@ -21,11 +26,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;