define('API_METHOD_DELETE', 'POST,DELETE');
$API = [];
-$called_api = null;
+$called_api = [];
/**
* It is not sufficient to use local_user() to check whether someone is allowed to use the API,
}
// this should output the last post (the one we just posted).
- $called_api = null;
+ $called_api = [];
return api_status_show($type);
}
*
* @param string $body
*
- * @return array|false
+ * @return array
*/
function api_get_attachments(&$body)
{
$ret = preg_match_all("/\[img\]([$URLSearchString]*)\[\/img\]/ism", $text, $images);
if (!$ret) {
- return false;
+ return [];
}
$attachments = [];