]> git.mxchange.org Git - friendica.git/commitdiff
Fixes:
authorRoland Häder <roland@mxchange.org>
Sat, 13 Aug 2022 20:42:30 +0000 (22:42 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 13 Aug 2022 20:47:57 +0000 (22:47 +0200)
- fixed "get() on NULL invocation, PHP is case-sensitive here
- renamed $this->baseurl to $this->baseUrl (instance) in MoveToAvatarCache to
  make it same as everywhere else

src/Console/MoveToAvatarCache.php
src/Module/Xrd.php

index 1f3147791f8b929743c6cf340751d3b28e1a5953..3e0fa0900f568101708388a9e4df5d9ec67365f4 100644 (file)
@@ -46,7 +46,7 @@ class MoveToAvatarCache extends \Asika\SimpleConsole\Console
        /**
         * @var $baseurl Friendica\App\BaseURL
         */
-       private $baseurl;
+       private $baseUrl;
 
        /**
         * @var L10n
@@ -75,12 +75,12 @@ HELP;
                return $help;
        }
 
-       public function __construct(\Friendica\Database\Database $dba, BaseURL $baseurl, L10n $l10n, IManageConfigValues $config, array $argv = null)
+       public function __construct(\Friendica\Database\Database $dba, BaseURL $baseUrl, L10n $l10n, IManageConfigValues $config, array $argv = null)
        {
                parent::__construct($argv);
 
                $this->dba     = $dba;
-               $this->baseurl = $baseurl;
+               $this->baseUrl = $baseUrl;
                $this->l10n    = $l10n;
                $this->config = $config;
        }
@@ -94,7 +94,7 @@ HELP;
 
                $fields = ['id', 'avatar', 'photo', 'thumb', 'micro', 'uri-id', 'url', 'avatar', 'network'];
                $condition = ["NOT `self` AND `avatar` != ? AND `photo` LIKE ? AND `uid` = ? AND `uri-id` != ? AND NOT `uri-id` IS NULL AND NOT `network` IN (?, ?)",
-                       '', $this->baseurl->get() . '/photo/%', 0, 0, Protocol::MAIL, Protocol::FEED];
+                       '', $this->baseUrl->get() . '/photo/%', 0, 0, Protocol::MAIL, Protocol::FEED];
 
                $count    = 0;
                $total    = $this->dba->count('contact', $condition);
index 21a0e5cd48afec0b39401f547885664d9c1f46b3..143d3e722ba3f929d3912f515d3dd1459aa00949 100644 (file)
@@ -111,7 +111,7 @@ class Xrd extends BaseModule
 
        private function printSystemJSON(array $owner)
        {
-               $baseURL = $this->baseurl->get();
+               $baseURL = $this->baseUrl->get();
                $json = [
                        'subject' => 'acct:' . $owner['addr'],
                        'aliases' => [$owner['url']],
@@ -157,7 +157,7 @@ class Xrd extends BaseModule
 
        private function printJSON(string $alias, array $owner, array $avatar)
        {
-               $baseURL = $this->baseurl->get();
+               $baseURL = $this->baseUrl->get();
                $salmon_key = Salmon::salmonKey($owner['spubkey']);
 
                $json = [
@@ -239,7 +239,7 @@ class Xrd extends BaseModule
 
        private function printXML(string $alias, array $user, array $owner, array $avatar)
        {
-               $baseURL = $this->baseurl->get();
+               $baseURL = $this->baseUrl->get();
                $salmon_key = Salmon::salmonKey($owner['spubkey']);
 
                $tpl = Renderer::getMarkupTemplate('xrd_person.tpl');