Merge pull request #3553 from BOINC/dpa_user_count

web: fix warning when user has no projects yet
This commit is contained in:
Kevin Reed 2020-04-06 16:04:31 -05:00 committed by GitHub
commit a05f16a43b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}