]> git.mxchange.org Git - friendica.git/commitdiff
Fix class methods staticity/return value
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 17 Dec 2017 20:29:16 +0000 (15:29 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 17 Dec 2017 20:30:26 +0000 (15:30 -0500)
src/App.php
src/Protocol/Diaspora.php
src/Protocol/Feed.php

index b16786140ad974a632b6036e4e135e8a5066b56f..95a2e99d696493f2d10810009cd630ecefa6ffe7 100644 (file)
@@ -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');
index 5ae63bd7a86d9e8993c5a9430966c248e0396085..321df6d28cd4f1f35eecba09b1c08387b3cae23f 100644 (file)
@@ -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"]
                );
index 629c2bfdd0e0c5d6b265c996dd1b437d68f29cf5..63706dcd68db202f31a0f037d16d1136f3d3023b 100644 (file)
@@ -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();