$called_api should always be an array

In order to avoid a PHP 7.2 error when using count()
This commit is contained in:
Pierre Rudloff 2018-04-24 16:16:57 +02:00
parent 7997df877d
commit 23371880e8

View file

@ -54,7 +54,7 @@ define('API_METHOD_POST', 'POST,PUT');
define('API_METHOD_DELETE', 'POST,DELETE'); define('API_METHOD_DELETE', 'POST,DELETE');
$API = []; $API = [];
$called_api = null; $called_api = [];
/** /**
* It is not sufficient to use local_user() to check whether someone is allowed to use the API, * It is not sufficient to use local_user() to check whether someone is allowed to use the API,
@ -2200,7 +2200,7 @@ function api_statuses_repeat($type)
} }
// this should output the last post (the one we just posted). // this should output the last post (the one we just posted).
$called_api = null; $called_api = [];
return api_status_show($type); return api_status_show($type);
} }