Fix issue accessing an array index on a boolean

This commit is contained in:
Tom Willemse 2024-02-29 09:01:24 -08:00
parent 907fd55a5c
commit e1bfad3df7

View file

@ -103,7 +103,15 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
GENERAL_ERROR, 'Could not get user',
'', __LINE__, __FILE__, $query, $this->db
);
return false;
return [ 'uId' => 0,
'username' => '',
'name' => '',
'email' => '',
'homepage' => '',
'content' => '',
'datetime' => NULL,
'isAdmin' => false,
'privateKeey' => '' ];
}
$row = $this->db->sql_fetchrow($dbresult);
@ -111,7 +119,15 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
if ($row) {
return $row;
} else {
return false;
return [ 'uId' => 0,
'username' => '',
'name' => '',
'email' => '',
'homepage' => '',
'content' => '',
'datetime' => NULL,
'isAdmin' => false,
'privateKeey' => '' ];
}
}