1
0
Fork 0

Merge pull request #11844 from Quix0r/fixes/call-get-on-null

Fixed "get() on NULL", PHP is case-sensitive here
This commit is contained in:
Philipp 2022-08-13 23:27:37 +02:00 committed by GitHub
commit 9be09f7df5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -46,7 +46,7 @@ class MoveToAvatarCache extends \Asika\SimpleConsole\Console
/** /**
* @var $baseurl Friendica\App\BaseURL * @var $baseurl Friendica\App\BaseURL
*/ */
private $baseurl; private $baseUrl;
/** /**
* @var L10n * @var L10n
@ -75,12 +75,12 @@ HELP;
return $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); parent::__construct($argv);
$this->dba = $dba; $this->dba = $dba;
$this->baseurl = $baseurl; $this->baseUrl = $baseUrl;
$this->l10n = $l10n; $this->l10n = $l10n;
$this->config = $config; $this->config = $config;
} }
@ -94,7 +94,7 @@ HELP;
$fields = ['id', 'avatar', 'photo', 'thumb', 'micro', 'uri-id', 'url', 'avatar', 'network']; $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 (?, ?)", $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; $count = 0;
$total = $this->dba->count('contact', $condition); $total = $this->dba->count('contact', $condition);

View file

@ -111,7 +111,7 @@ class Xrd extends BaseModule
private function printSystemJSON(array $owner) private function printSystemJSON(array $owner)
{ {
$baseURL = $this->baseurl->get(); $baseURL = $this->baseUrl->get();
$json = [ $json = [
'subject' => 'acct:' . $owner['addr'], 'subject' => 'acct:' . $owner['addr'],
'aliases' => [$owner['url']], 'aliases' => [$owner['url']],
@ -157,7 +157,7 @@ class Xrd extends BaseModule
private function printJSON(string $alias, array $owner, array $avatar) private function printJSON(string $alias, array $owner, array $avatar)
{ {
$baseURL = $this->baseurl->get(); $baseURL = $this->baseUrl->get();
$salmon_key = Salmon::salmonKey($owner['spubkey']); $salmon_key = Salmon::salmonKey($owner['spubkey']);
$json = [ $json = [
@ -239,7 +239,7 @@ class Xrd extends BaseModule
private function printXML(string $alias, array $user, array $owner, array $avatar) 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']); $salmon_key = Salmon::salmonKey($owner['spubkey']);
$tpl = Renderer::getMarkupTemplate('xrd_person.tpl'); $tpl = Renderer::getMarkupTemplate('xrd_person.tpl');

View file

@ -31,7 +31,7 @@ use Friendica\Util\Strings;
*/ */
final class FriendicaSmartyEngine extends TemplateEngine final class FriendicaSmartyEngine extends TemplateEngine
{ {
static $name = "smarty3"; static $name = 'smarty3';
const FILE_PREFIX = 'file:'; const FILE_PREFIX = 'file:';
const STRING_PREFIX = 'string:'; const STRING_PREFIX = 'string:';