https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #7288 from annando/fix-search
[friendica.git/.git]
/
src
/
BaseObject.php
diff --git
a/src/BaseObject.php
b/src/BaseObject.php
index
d006c24
..
9a2d064
100644
(file)
--- a/
src/BaseObject.php
+++ b/
src/BaseObject.php
@@
-4,7
+4,9
@@
*/
namespace Friendica;
*/
namespace Friendica;
-require_once 'boot.php';
+require_once __DIR__ . '/../boot.php';
+
+use Friendica\Network\HTTPException\InternalServerErrorException;
/**
* Basic object
/**
* Basic object
@@
-13,6
+15,9
@@
require_once 'boot.php';
*/
class BaseObject
{
*/
class BaseObject
{
+ /**
+ * @var App
+ */
private static $app = null;
/**
private static $app = null;
/**
@@
-21,11
+26,12
@@
class BaseObject
* Same as get_app from boot.php
*
* @return App
* Same as get_app from boot.php
*
* @return App
+ * @throws \Exception
*/
public static function getApp()
{
if (empty(self::$app)) {
*/
public static function getApp()
{
if (empty(self::$app)) {
-
self::$app = new App(dirname(__DIR__)
);
+
throw new InternalServerErrorException('App isn\'t initialized.'
);
}
return self::$app;
}
return self::$app;