Hello,
I have set up a basic drupal install, and during testing I found that avatar selection displayed this error when a user did not select an avatar (when it was mandatory to do so).
# warning: array_keys() [function.array-keys]: The first argument should be an array in /home/***/public_html/modules/avatar_selection/avatar_selection.module on line 327.
# warning: array_fill() [function.array-fill]: Number of elements must be positive in /home/***/public_html/modules/avatar_selection/avatar_selection.module on line 328.
# warning: implode() [function.implode]: Invalid arguments passed in /home/***/public_html/modules/avatar_selection/avatar_selection.module on line 328.
Other than the display of this error, the module works great.
I'm looking into a fix, but I figure I'd leave this here just in case you all had a similar issue. Any advice is appreciated, of course. Thanks!
Comments
Comment #1
LynnS CreditAttribution: LynnS commentedI have the same issue.
Comment #2
LynnS CreditAttribution: LynnS commentedImperfect solution, but it turns off the warnings:
At line 325 change to
from
This turns off avatar selection at sign-up, but it stops the error messages. People can always choose an avatar once logged-in.
Comment #3
stella CreditAttribution: stella commentedI can't reproduce this issue, is it still happening with the 5.x-2.7 release? How about the latest dev release? Does it only happen on the user registration page? What are your other settings?
This might be a duplicate of #303290: Or simply select an icon field is required.. Can you try the latest dev release?
Cheers,
Stella
Comment #4
livefordo CreditAttribution: livefordo commentedHi stella,
Yes still the problem is there (Warning displayed when no avatar is selected)
Comment #5
stella CreditAttribution: stella commentedCan you confirm you're using the latest dev release? Sorry, just want to be sure.
Comment #6
livefordo CreditAttribution: livefordo commentedYa yes stella i am using the new dev release 5.x-2.7 and my drupal version is 5.15 Can u fix this soon
Comment #7
stella CreditAttribution: stella commented@livefordo avatar_selection 5.x-2.7 is not the dev release. Please use avatar_selection 5.x-2.x-dev release
Comment #8
livefordo CreditAttribution: livefordo commentedHello Stella sorry for the wrong information...I am saying i know 5.x-2.7 is not the dev release but it's not working perfectly when no Avatar was selected in registration form...
Comment #9
stella CreditAttribution: stella commentedThis issue should already be fixed in the dev release. Could you upgrade to it please?
Comment #10
husztisanyi CreditAttribution: husztisanyi commentedI tried the 5.x-2.x-dev release, but there is the probleme, if check on this:
If check off, the module work fine!
The probleme may be here:
362 elseif ($user->uid != 0 || in_array(1, array_keys($user->roles))) {
because when I changed:
362 elseif ($user->uid != 0 ) {
...it works fine again.
Comment #11
stella CreditAttribution: stella commentedDo you have enough available user avatars for each of your roles? In particular the 'authenticated user' role?
Comment #12
stella CreditAttribution: stella commentedThe change in comment #10 isn't correct, as it allows anonymous users access to all avatars. I've committed a fix for anonymous permissions, so a fix should be available in the next dev release later today.
Cheers,
Stella
Comment #14
stella CreditAttribution: stella commentedReleased in 6.x-1.6 and 5.x-2.8.