Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Kevin_MIP on April 29, 2004, 04:11:00 PM

Title: Beta5 - Own Profile in "PM Options" not showing current settings?
Post by: Kevin_MIP on April 29, 2004, 04:11:00 PM
I can't see the current settings when viewing my own profile.

I found this section of code that is causing it (profile.php):

function loadThemeOptions($memID)
{
global $context, $options, $db_prefix, $user_profile;

if (isset($_POST['options']) && isset($_POST['default_options']))
$_POST['options'] += $_POST['default_options'];

if ($context['user']['is_owner'])
$context['member']['options'] = &$options;


If I change one line, I can get it to show my current settings.

$context['member']['options'] = $options;

Will this break something else in the Profile screen?
Title: Re: Beta5 - Own Profile in "PM Options" not showing current settings?
Post by: [Unknown] on April 29, 2004, 05:38:43 PM
What version of PHP are you using?

That's done to save memory since the variable is in the global scope.

-[Unknown]
Title: Re: Beta5 - Own Profile in "PM Options" not showing current settings?
Post by: Kevin_MIP on April 30, 2004, 09:59:43 AM
Quote from: [Unknown] on April 29, 2004, 05:38:43 PM
What version of PHP are you using?

That's done to save memory since the variable is in the global scope.

-[Unknown]
php version is 4.3.6
Title: Re: Beta5 - Own Profile in "PM Options" not showing current settings?
Post by: [Unknown] on April 30, 2004, 02:33:30 PM
Well, changing it not to use a reference shouldn't cause any problems, but since it is a global variable a reference should work fine...

-[Unknown]