Commit 6663ab1c authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1834117: Property of non-object error"

parents ad4dd6af bf6a5951
......@@ -5618,6 +5618,7 @@ class View {
else {
// Need to find the views to add it to
foreach ($viewdata as $k => $v) {
if (is_object($v)) {
if (!isset($v->id) || is_null($v->id)) {
continue;
}
......@@ -5626,6 +5627,16 @@ class View {
$viewdata[$k]->tags[] = $tag->tag;
}
}
else {
if (!isset($v['id'])) {
continue;
}
$viewid = (isset($v['viewid']) && !empty($v['viewid'])) ? $v['viewid'] : $v['id'];
if ($viewid == $tag->resourceid) {
$viewdata[$k]['tags'][] = $tag->tag;
}
}
}
}
}
}
......
Markdown is supported
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