Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: dxyy on January 08, 2008, 02:22:35 AM

Title: Undefined variable: modsettings
Post by: dxyy on January 08, 2008, 02:22:35 AM
I'm getting some errors in my log, but I'm not knowledgeable enough to know what the real problem is.

8: Undefined variable: modsettings
File: /home/daxueyin/public_html/forum/Sources/Load.php
Line: 1093 (also line 1094)

I'll attach the load.php if that helps.

Any help with this would be appreciated.

Thank you. :)
Title: Re: Undefined variable: modsettings
Post by: karlbenson on January 08, 2008, 11:15:56 AM
Its related to the visual warning mod
'warning' => $profile['warning'] > 0 ? array(
'link' => ($modsettings['visualw_image_' . $warn] != "" ? '<img src="' . $settings['images_url'] . '/' . $modsettings['visualw_image_' . $warn] . '"/>' : '') .
($modsettings['visualw_color_' . $warn] != "" ? '<font size="2" color="' . $modsettings['visualw_color_' . $warn] . '">
' . $txt['visual_text_' . $warn] . '</font>' : '') . '<br />',
) : array('link' => ''),


Those instances of $modsettings need to be changed to $modSettings

(noting the uppercase S on settings).

Title: Re: Undefined variable: modsettings
Post by: dxyy on January 08, 2008, 12:44:46 PM
Thank you Karl! :)

Problem solved.
Title: Re: Undefined variable: modsettings
Post by: karlbenson on January 08, 2008, 01:04:04 PM
Be aware, that the Visual warning mod may have added more code which uses all lowercase.

So you may get some more errors in new locations.
Title: Re: Undefined variable: modsettings
Post by: dxyy on January 08, 2008, 02:21:56 PM
Thanks for the tip, I'll be on the lookout for additional errors, but at least this time I'll know how to deal with them. ;)