Commit cb5c36e4 authored by Nigel McNie's avatar Nigel McNie
Browse files

Minor fix to the format of search results - ignore empty but public fields for...

Minor fix to the format of search results - ignore empty but public fields for users, so we don't end up with an emty string index in the data returned
parent 728480b9
......@@ -93,7 +93,10 @@ function search_user($query_string, $limit, $offset = 0) {
$public_fields_byuser = array();
if (!empty($public_fields)) {
foreach ($public_fields as $field) {
$public_fields_byuser[$field->id][$field->artefacttype] = $field->title;
// This will be null if the user does not have a field marked public
if ($field->artefacttype !== null) {
$public_fields_byuser[$field->id][$field->artefacttype] = $field->title;
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment