From 984e7c5e5d133ab4305c766a924d2517a03bbd2c Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 30 Nov 2024 19:42:40 +0000 Subject: [PATCH] Fix errors in ljpost addon --- ljpost/ljpost.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 7acc6589..b416c605 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -8,7 +8,6 @@ * Author: Cat Gray */ -use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; use Friendica\Core\Logger; @@ -203,10 +202,12 @@ EOT; Logger::debug('ljpost: data: ' . $xml); + $x = ''; + if ($lj_blog !== 'test') { $x = DI::httpClient()->post($lj_blog, $xml, ['Content-Type' => 'text/xml'])->getBodyString(); } - Logger::info('posted to livejournal: ' . ($x) ? $x : ''); + Logger::info('posted to livejournal: ' . $x); } }