]> git.mxchange.org Git - friendica.git/commitdiff
$called_api should always be an array
authorPierre Rudloff <contact@rudloff.pro>
Tue, 24 Apr 2018 14:16:57 +0000 (16:16 +0200)
committerPierre Rudloff <contact@rudloff.pro>
Tue, 8 May 2018 10:16:48 +0000 (12:16 +0200)
In order to avoid a PHP 7.2 error when using count()

include/api.php

index 72997dd3a06529a08e3296e69b6a58f8a6ecae93..f0120684c99d218e45613f137f5d8adba2883cb7 100644 (file)
@@ -54,7 +54,7 @@ define('API_METHOD_POST', 'POST,PUT');
 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,
@@ -2200,7 +2200,7 @@ function api_statuses_repeat($type)
        }
 
        // this should output the last post (the one we just posted).
-       $called_api = null;
+       $called_api = [];
        return api_status_show($type);
 }