PHP errors in the memberlist

Dr. Deejay

  • Happy new year all!
  • Posts: 118
PHP errors in the memberlist
« on September 7th, 2012, 04:00 PM »
When viewing the memberlist, you get errors like these:
Quote
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.
  • Posts: 14,278
Re: PHP errors in the memberlist
« Reply #1, on September 7th, 2012, 04:19 PM »
Bah, my fault.

Easy fix. Memberlist.php

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

Code: [Select]
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
  • Posts: 16,082
Re: PHP errors in the memberlist
« Reply #2, on September 7th, 2012, 04:42 PM »
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!
  • Posts: 118
Re: PHP errors in the memberlist
« Reply #3, on September 7th, 2012, 05:53 PM »
Thanks for fixing it, it works fine again. :)
Quote
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.
  • Posts: 14,278