Fix errors in ljpost addon

This commit is contained in:
Art4 2024-11-30 19:42:40 +00:00 committed by Hypolite Petovan
parent d08a280ba6
commit 984e7c5e5d

View file

@ -8,7 +8,6 @@
* Author: Cat Gray <https://free-haven.org/profile/catness> * Author: Cat Gray <https://free-haven.org/profile/catness>
*/ */
use Friendica\App;
use Friendica\Content\Text\BBCode; use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook; use Friendica\Core\Hook;
use Friendica\Core\Logger; use Friendica\Core\Logger;
@ -203,10 +202,12 @@ EOT;
Logger::debug('ljpost: data: ' . $xml); Logger::debug('ljpost: data: ' . $xml);
$x = '';
if ($lj_blog !== 'test') { if ($lj_blog !== 'test') {
$x = DI::httpClient()->post($lj_blog, $xml, ['Content-Type' => 'text/xml'])->getBodyString(); $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);
} }
} }