From: Zach Prezkuta Date: Tue, 1 May 2012 02:51:22 +0000 (-0600) Subject: change api.php in function api_item_get_user to check if $usercache is NULL before... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a84409336532e4b3776b6a747aa845bd74615d11;p=friendica.git change api.php in function api_item_get_user to check if $usercache is NULL before checking an element in it --- diff --git a/include/api.php b/include/api.php index f9be68c3df..a693a32c8b 100644 --- a/include/api.php +++ b/include/api.php @@ -380,7 +380,7 @@ $nick = $name; // Generating a random ID - if (!array_key_exists($nick, $usercache)) + if (is_null($usercache[$nick]) or !array_key_exists($nick, $usercache)) $usercache[$nick] = mt_rand(2000000, 2100000); $ret = array(