X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseObject.php;h=9a2d064750b7d74ca13bc17fd2473323cf3298f8;hb=295d90d496a56217383481fa7a0153e0ac48e38a;hp=d8d36e37b94e0cb2af2e5af0544e058d435b6c4d;hpb=fe8f0e00454919e3ee1150a2e75badb55a273c3a;p=friendica.git diff --git a/src/BaseObject.php b/src/BaseObject.php index d8d36e37b9..9a2d064750 100644 --- a/src/BaseObject.php +++ b/src/BaseObject.php @@ -4,9 +4,9 @@ */ namespace Friendica; -require_once 'boot.php'; +require_once __DIR__ . '/../boot.php'; -use Friendica\Core\Logger; +use Friendica\Network\HTTPException\InternalServerErrorException; /** * Basic object @@ -15,6 +15,9 @@ use Friendica\Core\Logger; */ class BaseObject { + /** + * @var App + */ private static $app = null; /** @@ -23,12 +26,12 @@ class BaseObject * Same as get_app from boot.php * * @return App + * @throws \Exception */ public static function getApp() { if (empty(self::$app)) { - $logger = Logger::create('app'); - self::$app = new App(dirname(__DIR__), $logger); + throw new InternalServerErrorException('App isn\'t initialized.'); } return self::$app;