Customizing SMF > SMF Coding Discussion
profile view bug
[Unknown]:
Fixed it...
-[Unknown]
7summits:
Hey [Unknown]
how did you fix this? Just noticed I have the same problem on my site which I upgraded yesterday. Uploaded all the files (twice) and ran upgrade.php.
But when looking at a profile as a guest, I get the error message. How can I fix it?
Check yourself: http://7summits.com/forum/index.php?action=profile;u=1
Thanks,
7s
[Unknown]:
I don't remember off hand, it was on that line - can you quote the line giving the error?
-[Unknown]
7summits:
This is the error message on screen:
Notice: Undefined index: profile_areas in /home/summits/public_html/forum/Sources/Profile.php on line 226
Notice: Undefined index: profile_areas in /home/summits/public_html/forum/Sources/Profile.php on line 226
This is the line in question (with line before (comment) and line after added for clarification):
--- Code: --- // This is here so the menu won't be shown unless it's actually needed.
if (count($context['profile_areas']) == 1 || (count($context['profile_areas']) == 2 && isset($context['profile_areas']['profile_action']['areas']['send_pm']) && count($context['profile_areas']['profile_action']['areas']) == 1))
$context['profile_areas'] = array();
--- End code ---
Thanks!
[Unknown]:
Make it:
if (empty($context['profile_areas']) || count($context['profile_areas']) == 1 || (count($context['profile_areas']) == 2 && isset($context['profile_areas']['profile_action']['areas']['send_pm']) && count($context['profile_areas']['profile_action']['areas']) == 1))
-[Unknown]
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version