Error in profile_icon_url call

Bug #1308294 reported by Robert Lyon on 2014-04-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Low
Robert Lyon

Bug Description

In htdocs/lib/user.php (approx line 2504) we have:

 if (!property_exists($user, 'profileicon') || !property_exists($user, 'email')) {
   ...
        log_debug("profile_icon_url was passed a user without profileicon & email properties");
   ...
 }

The warn is for AND but the check is for OR.

The check should be for AND.

Reviewed: https://reviews.mahara.org/3266
Committed: http://gitorious.org/mahara/mahara/commit/e3cd08c6befe71131b1961fb8b0657efe361823c
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit e3cd08c6befe71131b1961fb8b0657efe361823c
Author: Aaron Wells <email address hidden>
Date: Wed Apr 16 12:48:25 2014 +1200

Making profile_icon_url()'s validation a little more logical

Bug 1308294: The code doesn't *really* need profileicon or email,
because it can always fall back to showing the anonymous user icon.
However, the lack of profileicon and email fields can indicating
a coding problem, so we should show a warning if they're missing.

Change-Id: I9926b7a4457049ef097e16d7999f109a623f2644

Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw) on 2014-10-21
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers