Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: bdewong - tammikuu 02, 2014, 03:33:48 IP

Otsikko: Log Errors never_expire, default_username, default_password
Kirjoitti: bdewong - tammikuu 02, 2014, 03:33:48 IP
Hi,
I've been making edits from a copy of the default template Login.template.php, however I am getting quite a few errors in my error log that don't seem to be making sense. I was wondering if anyone else experienced any problems like this in the past.

The errors are similar to the following
8: Undefined index: never_expire
File: /webdir/Themes/themedir/Login.template.php
Line: 142

There are also similar errors with default_password and default_username. All of these are used in the $context variable similar to $context['never_expire']

I have tried setting these in the start of the function using
if (!isset($context['never_expire'])
    $context['never_expire'] = '';


The above doesn't seem to fix any of the problems.

I appreciate any help.

Thanks,
Brent
Otsikko: Re: Log Errors never_expire, default_username, default_password
Kirjoitti: IchBin™ - tammikuu 03, 2014, 11:21:14 AP
Maybe post your file so people can take a look.
Otsikko: Re: Log Errors never_expire, default_username, default_password
Kirjoitti: bdewong - tammikuu 03, 2014, 12:44:18 IP
I've attached my template file. Any help is appreciated.
Thanks.
Otsikko: Re: Log Errors never_expire, default_username, default_password
Kirjoitti: emanuele - tammikuu 03, 2014, 05:11:07 IP
Line 142 doesn't have an $context['never_expire'], I'd guess the error appeared before you added/removed some other piece of code. Can you check if you have any new error with the "correct" position?
Otherwise you should attach the file before your changes. ;)
Otsikko: Re: Log Errors never_expire, default_username, default_password
Kirjoitti: bdewong - tammikuu 03, 2014, 05:28:24 IP
Sorry, yes. The new line numbers are 131 and 127 for never_expire.
Otsikko: Re: Log Errors never_expire, default_username, default_password
Kirjoitti: emanuele - tammikuu 04, 2014, 07:42:03 AP
Can you attach also the LogInOut.php that you can find in the Sources directory?