From fe328ae5e4e41d8696342c44a866de4a7300ea84 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 2 Jan 2016 02:01:54 +0100 Subject: [PATCH] Fix because qvitter supplies a twitter array value which is an array works for json API, not for XML, so we make an exception here... --- lib/apiaction.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/apiaction.php b/lib/apiaction.php index 155d91ca7b..9a574008aa 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -651,6 +651,11 @@ class ApiAction extends Action break; default: if (strncmp($element, 'statusnet_', 10) == 0) { + if ($element === 'statusnet_in_groups' && is_array($value)) { + // QVITTERFIX because it would cause an array to be sent as $value + // THIS IS UNDOCUMENTED AND SHOULD NEVER BE RELIED UPON (qvitter uses json output) + $value = json_encode($value); + } $this->element('statusnet:'.substr($element, 10), null, $value); } else { $this->element($element, null, $value); -- 2.39.5