8: Undefined index: id_member

Started by extremenewbie, April 02, 2009, 01:17:59 PM

Previous topic - Next topic

rosspet

Only one file showing now - Themes/clean/index.template.php lines 239 and 240



Arantor

Please can you attach that file here so we can take a look at it?


rosspet

Removed the reference to id_member in lines 239 and 240 as I can't find where it is set. Left template eval disabled, errors gone and all seems to be working OK.
Thanks.

Arantor

Interesting. There are two things that should be broken but aren't only on a technicality.

You could replace $context['id_member'] with $context['user']['id'] though which should also fix the issue.

rosspet

Thanks Arantor, tried your suggestion, unticked Disable template evaluation, everything works  8)

Arantor

You could leave it ticked, actually. There is a performance boost given too.

Prosoi

Hello!

I've same problem on my forum - SMF2.0 RC2. No mods installed.

Very strange. This error in the log came only from one user, a Global Moderator. But other users and Globals - no problem.

szinski

I know this is an old topic, but I'm seeing the same behavior. Just upgraded from 1.1.18 to 2.0.4 and I'm seeing this in my log:

http://www.pizzamaking.com/forum/index.php?action=dlattach;topic=20346.0;attach=72069;image
8: Undefined index: id_member
File: /home/pizza/public_html/forum/Sources/Security.php
Line: 239

Here is line 239 from my Security.php file:

    // Only check the ban every so often. (to reduce load.)
    if ($forceCheck || !isset($_SESSION['ban']) || empty($modSettings['banLastUpdated']) || ($_SESSION['ban']['last_checked'] < $modSettings['banLastUpdated']) || $_SESSION['ban']['id_member'] != $user_info['id'] || $_SESSION['ban']['ip'] != $user_info['ip'] || $_SESSION['ban']['ip2'] != $user_info['ip2'] || (isset($user_info['email'], $_SESSION['ban']['email']) && $_SESSION['ban']['email'] != $user_info['email']))
    {



system1024

Quote from: Blue Crab on March 09, 2013, 05:13:00 PM
I know this is an old topic, but I'm seeing the same behavior. Just upgraded from 1.1.18 to 2.0.4 and I'm seeing this in my log:

8: Undefined index: id_member
File: /home/pizza/public_html/forum/Sources/Security.php
Line: 239

Here is line 239 from my Security.php file:

    // Only check the ban every so often. (to reduce load.)
    if ($forceCheck || !isset($_SESSION['ban']) || empty($modSettings['banLastUpdated']) || ($_SESSION['ban']['last_checked'] < $modSettings['banLastUpdated']) || $_SESSION['ban']['id_member'] != $user_info['id'] || $_SESSION['ban']['ip'] != $user_info['ip'] || $_SESSION['ban']['ip2'] != $user_info['ip2'] || (isset($user_info['email'], $_SESSION['ban']['email']) && $_SESSION['ban']['email'] != $user_info['email']))
    {

same bug... how to fix?

margarett

Did you also upgrade from 1.1.x to 2.0.x?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

system1024

Quote from: margarett on January 23, 2015, 05:54:36 AM
Did you also upgrade from 1.1.x to 2.0.x?

yes - upgrade from 1.1.18 to 2.0.9

margarett

This is a known issue (not exactly an issue) and it will be fixed by itself. A quote about this issue:
QuoteThe variable in question is $_SESSION['ban']['id_member'] - it's the only mention of id_member in that line, so it *must* be that.

SMF 1 to SMF 2 changed how ban-checking per session was done very slightly, the byproduct of which is this error. There's no point fixing it because it's just an extra check that would otherwise need to be carried out every so often, and it's only an issue during the 1.1 to 2.0 upgrade.

Once the session refreshes or the ban check refreshes - whichever first - the new values are generated, and the problem fixes itself. Saying to leave it for an hour simply ensured that the session would be cleared (the default is 20 minutes) so that the new session check would be done that fixed it
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: