From a7757190373ba337e69b403ce4889f987095eeb2 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 3 Apr 2020 11:32:06 -0700 Subject: [PATCH] web: fix warning when user has no projects yet --- html/inc/user.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/inc/user.inc b/html/inc/user.inc index 530419675c..72a910a247 100644 --- a/html/inc/user.inc +++ b/html/inc/user.inc @@ -77,7 +77,7 @@ function get_other_projects($user) { // auto-cast the project list to an array of stdClass projects // $remote = @json_decode(json_encode((array)$xml_object))->project; - if (count($remote) == 1) { + if ($remote && count($remote) == 1) { $remote = array($remote); }