Fix errors in ljpost addon

pull/1579/head
Art4 2024-11-30 19:42:40 +00:00
parent e86d15993b
commit 5f6f374f09
1 changed files with 3 additions and 2 deletions

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);
} }
} }