diff --git a/src/App.php b/src/App.php index b16786140..95a2e99d6 100644 --- a/src/App.php +++ b/src/App.php @@ -312,10 +312,8 @@ class App { * * @return string */ - public static function get_basepath() { - if (isset($this)) { - $basepath = $this->basepath; - } + public function get_basepath() { + $basepath = $this->basepath; if (! $basepath) { $basepath = Config::get('system', 'basepath'); diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 5ae63bd7a..321df6d28 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -1094,7 +1094,7 @@ class Diaspora preg_replace_callback( $expression, function ($match) use ($item) { - return self::fetchGuidSub($match, $item); + self::fetchGuidSub($match, $item); }, $item["body"] ); @@ -1102,7 +1102,7 @@ class Diaspora preg_replace_callback( "&\[url=/posts/([^\[\]]*)\](.*)\[\/url\]&Usi", function ($match) use ($item) { - return self::fetchGuidSub($match, $item); + self::fetchGuidSub($match, $item); }, $item["body"] ); diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 629c2bfdd..63706dcd6 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -32,7 +32,7 @@ class Feed { * * @return array In simulation mode it returns the header and the first item */ - function import($xml, $importer, &$contact, &$hub, $simulate = false) { + public static function import($xml, $importer, &$contact, &$hub, $simulate = false) { $a = get_app();