From 54484e56e7156053fa665341966313d2b2b140eb Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sat, 12 Sep 2020 13:58:57 +0300 Subject: [PATCH] [API] Fix /api/statuses/update reporting a failure --- lib/api/apiaction.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/api/apiaction.php b/lib/api/apiaction.php index b9dcc6023b..32bcd9d36d 100644 --- a/lib/api/apiaction.php +++ b/lib/api/apiaction.php @@ -190,14 +190,14 @@ class ApiAction extends Action * * @param string $tag Element type or tagname * @param array|string|null $attrs Array of element attributes, as key-value pairs - * @param string|null $content string content of the element + * @param string|bool|null $content string content of the element * * @return void */ - public function element(string $tag, $attrs = null, ?string $content = null): void + public function element(string $tag, $attrs = null, $content = null): void { if (is_bool($content)) { - $content = ($content ? "true" : "false"); + $content = ($content ? 'true' : 'false'); } parent::element($tag, $attrs, $content); @@ -512,6 +512,9 @@ class ApiAction extends Action // FIXME: MOVE TO SHARE PLUGIN $this->showTwitterXmlStatus($value, 'retweeted_status'); break; + case 'tags': + // Used only for showTwitterRssItem + break; default: if (strncmp($element, 'statusnet_', 10) == 0) { if ($element === 'statusnet_in_groups' && is_array($value)) {