From: Mikael Nordfeldth Date: Sat, 2 Jan 2016 01:01:54 +0000 (+0100) Subject: Fix because qvitter supplies a twitter array value which is an array X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fe328ae5e4e41d8696342c44a866de4a7300ea84;p=quix0rs-gnu-social.git 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... --- 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);