]> git.mxchange.org Git - friendica.git/blobdiff - src/BaseObject.php
Summary has to be converted to HTML / Don't use summary when we have the source
[friendica.git] / src / BaseObject.php
index 33ed67754674b34731bef4eab345df47be755468..7e90478a9d613a378bf28dace96144a9b38f94b5 100644 (file)
@@ -4,6 +4,10 @@
  */
 namespace Friendica;
 
+require_once __DIR__ . '/../boot.php';
+
+use Friendica\Network\HTTPException\InternalServerErrorException;
+
 /**
  * Basic object
  *
@@ -19,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;