Download & Extend

At least one user must have a picuture. [update]

Project:Avatar gallery
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

warning: Invalid argument supplied for foreach() in C:\drupal\drupal-5.0-rc1\modules\avatar_gallery\avatar_gallery.module on line 291.

I don't see the images in the block.

Comments

#1

Is it possible that you haven't enabled avatar support or that you haven't yet uploaded an image?

#2

I put images into the correct dir
I enables the function for the role

#3

Normally, one uploads the images via the user's page. Is this what you did? Otherwise, I must admit (as if you couldn't tell) that I'm at a loss to explain the problem. Hmmm...

#4

same issue here, I will try and figure it out.

#5

It seems to be fin once you get 2+ images uploaded... The error is

foreach ($coords as $uid => $coord)

You need an if statement wrapping this in case no images exist. I think just an

if ($coords) { foreach ($coords as $uid => $coord)... }

Would do it. For now, just make sure you have more than 2 images uploaded.

#6

I have the same problem in my 5.1 drupal:
warning: Invalid argument supplied for foreach() in /xxx/modules/avatar_gallery/avatar_gallery.module on line 291.

I have aded 3 avatars in profile...

#7

warning: Invalid argument supplied for foreach() in ...../public_html/modules/avatar_gallery/avatar_gallery.module on line 291.

i have the same problem even if i uploaded more then 3 images

#8

Title:any explanation ?» At least one user must have a picuture.

I got the same error (pic support enabled, upload a default pic to files/pictures).
After adding a pic to user/1 the error is gone.
...but no images in the Avatar gallery block, although I can move my mouse over the block
and I see links to the users...

--

#9

Title:At least one user must have a picuture.» At least one user must have a picuture. [update]

Logging in today, it is working fine. I was using Firefox, maybe I needed to clear the cache.
*should* have tested on another browser.

#10

Status:active» fixed

Fixed the warning in the 5.x-1.x-dev version of May 6, 2008.

#11

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.