Jump to content



Issue Information

  • #000693

  • 0 - None Assigned

  • New

  • 2.3.4

  • -

Issue Confirmations

  • Yes (0)No (0)
Photo

E_Notice Error when Force Cookie Use set to False on Admin

Posted by BearDown on 13 June 2014 - 16:46

Ok, receive this error on every admin page I go to with 2.3.4. , of course the error count varies depending on the page.  

 

This is a straight install with only KISS Error and Debugging on it. 

 

If I set Force_cookie_use to True this error goes away, but on false this is everywhere.

 

E_NOTICE Error Count: 83
Error: Undefined variable: SID
File: includes/functions/html_output.php
Line: 48
 
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
    if ( ($add_session_id == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
      if (tep_not_null($SID)) {
        $_sid = $SID;
      } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
        if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
          $_sid = tep_session_name() . '=' . tep_session_id();
        }
      }
    }

It's the (tep_not_null($SID)) line that is #48

As a follow up:  I grabbed the if statement from Hide Form Elements (line 325) of

 if (defined('SID') && tep_not_null(SID)) {

And replaced the line 48.  This has removed all the E-Notices from all pages.

 

Is this acceptable or another solution would be better?  



i like it but bake a cake would be better :) than force cookies.



The proposed fix is incorrect. $SID is a variable, not a constant. The correct form for line 48 would be:

      if (isset($SID) && tep_not_null($SID)) {

Regards

Jim