lib/view.php get_extra_view_info Trying to get property of non-object
Bug #1776448 reported by
Mark Webster
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Incomplete
|
Undecided
|
Mark Webster |
Bug Description
The first foreach $viewdata in the function checks if $v is an object and casts it as one if not. Further down is a second foreach on $viewdata (inside the "if ($gettags && !empty(
Proposed fix:
change the first loop to set $v as a reference via &$v to make the cast to object affect the original $viewdata items. The loop only gets from $v and does no setting, so this will be safe to do.
Affects at least Mahara 17.04 and above.
Changed in mahara: | |
assignee: | nobody → Mark Webster (mark-webster-v) |
To post a comment you must log in.
Can you please provide a bit more information, Mark, to help replicate the issue?