PHP errors in the memberlist

Dr. Deejay

  • Happy new year all!
  • Messages: 118
PHP errors in the memberlist
« le 7 Septembre 2012 à 16:00 »
When viewing the memberlist, you get errors like these:
Citation
Notice: Undefined index: custom_fields in /Sources/Memberlist.php on line 583

Warning: Invalid argument supplied for foreach() in /Sources/Memberlist.php on line 583
The memberlist is still displayed, though. Btw, I like the smileys. :eheh:

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278
Re: PHP errors in the memberlist
« Réponse #1, le 7 Septembre 2012 à 16:19 »
Bah, my fault.

Easy fix. Memberlist.php

Code: [Sélectionner]
foreach ($context['members'][$member]['custom_fields'] as $field)
$context['members'][$member]['mlist_cf'][$field['colname']] = $field['value'];

Code: [Sélectionner]
if (!empty($context['members'][$member]['custom_fields']))
foreach ($context['members'][$member]['custom_fields'] as $field)
$context['members'][$member]['mlist_cf'][$field['colname']] = $field['value'];

I've fixed it locally but am in the middle of nasty rewrite of quick moderation so won't be committing for a bit.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Messages: 16 082
Re: PHP errors in the memberlist
« Réponse #2, le 7 Septembre 2012 à 16:42 »
Should be fixed here too now.

Smileys -> they're Wedge.org specific. i.e. the smileys in Wedge are also in SMF 2. I have no qualms with releasing the smiley set as it is, but it won't be part of Wedge because I'm not sure I can claim ownership of it, even though I made many of them myself. (The rest is taken from the official PunBB smileys, or variations on it released on a fan forum.)

Dr. Deejay

  • Happy new year all!
  • Messages: 118
Re: PHP errors in the memberlist
« Réponse #3, le 7 Septembre 2012 à 17:53 »
Thanks for fixing it, it works fine again. :)
Citation
I have no qualms with releasing the smiley set as it is
That'd be great. ;D

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278