error with profile icon and gravitar

Bug #1380433 reported by Robert Lyon on 2014-10-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Son Nguyen

Bug Description

When I have 'use gravitar' turned on and then I go to alter view access and share with friends I get this error:

[WAR] ee (lib/user.php:2685) remote_avatar_url: size should be in (16, 20, 25, 40, 50, 60, 100)
Call stack (most recent first):

    log_message("remote_avatar_url: size should be in (16, 20, 25, ...", 8, true, true) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/errors.php:95
    log_warn("remote_avatar_url: size should be in (16, 20, 25, ...") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/user.php:2685
    remote_avatar_url("<email address hidden>", array(size 2)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/thumb.php:78

[WAR] ee (lib/user.php:2690) Array to string conversion
Call stack (most recent first):

    log_message("Array to string conversion", 8, true, true, "/home/robertl/htdocs/mahara-devel/mahara/htdocs/li...", 2690) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/errors.php:439
    error(8, "Array to string conversion", "/home/robertl/htdocs/mahara-devel/mahara/htdocs/li...", 2690, array(size 4)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/user.php:2690
    remote_avatar_url("<email address hidden>", array(size 2)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/thumb.php:78

[DBG] ee (lib/web.php:1012) Missing file in theme default: images/no_userphotoArray.png

I notice that the $size being passed in is not a string but an array
eg:

[DBG] ee (lib/user.php:2683) Array
(
    [maxw] => 25
    [maxh] => 25
)

Robert Lyon (robertl-9) on 2014-10-13
Changed in mahara:
milestone: none → 1.10.0
assignee: nobody → Son Nguyen (ngson2000)
importance: Undecided → High
status: New → Confirmed
Son Nguyen (ngson2000) on 2014-10-13
Changed in mahara:
status: Confirmed → In Progress
Eduardo (o-eduardo) wrote :

How to test:

1. Log in as admin
2. Go to Administration
3. Go to “Users” → Create user Kristina who has a gravatar profile icon
4. Go to Add users by CSV → Create user Kevin
5. Go to Configure site → user settings
6. Select the option “Display remote avatars” → Update site options
7. Kristina gravatar icon shows, while Kevin does not → Passed
7. Log out as admin
8. Log in as Kevin
9. Have Kevin add Kristina as a friend
10. Log out as Kevin
11. Log in as Kristina
12. Accept Kevin's friendship request
13. Go to Portfolio → Create page
14. Go to share page
15. Share with “friends” → save
16. No error message appears → Passed

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

commit da977d001e74d155c43c1be11be7f23486cb47da
Author: Son Nguyen <email address hidden>
Date: Mon Oct 13 16:20:38 2014 +1300

Fix the parameters for remote_avatar_url(). Bug 1380433

Change-Id: Idd084a6f0d28c1749bf8a09a502c4eec7032e842

Robert Lyon (robertl-9) on 2014-10-19
Changed in mahara:
status: In Progress → Fix Committed

Reviewed: https://reviews.mahara.org/3836
Committed: http://gitorious.org/mahara/mahara/commit/a019b2cbae098c9584e783f23528dfb6645adf5a
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit a019b2cbae098c9584e783f23528dfb6645adf5a
Author: Son Nguyen <email address hidden>
Date: Mon Oct 13 16:20:38 2014 +1300

Fix the parameters for remote_avatar_url(). Bug 1380433

Change-Id: Idd084a6f0d28c1749bf8a09a502c4eec7032e842

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