The module trigger 2 notices for anonymous users:

Notice : Undefined variable: _SESSION dans include_once() (ligne 18 dans /.../sites/all/modules/languageinterface/languageinterface.module).
Notice : Undefined variable: _SESSION dans include_once() (ligne 27 dans /.../sites/all/modules/languageinterface/languageinterface.module).

One possible fix is to add a 'drupal_session_start();' just before the first '$referrer = $_SERVER["HTTP_REFERER"];'. But adding this also trigger 2 new notices:

Notice : Undefined index: cli dans include_once() (ligne 19 dans /.../sites/all/modules/languageinterface/languageinterface.module).
Notice : Undefined index: cli dans include_once() (ligne 28 dans /.../sites/all/modules/languageinterface/languageinterface.module).

To fix these new notices we need to initialize the $_SESSION['cli] array if it is not defined like this:

  if (!isset($_SESSION['cli'])) {
    $_SESSION['cli'] = array(
      'lang' => array(),
      'source' => array(),
      'lang' => $language->language,
      'source' => ''
    );
  }
CommentFileSizeAuthor
#1 notices_fix-2173085-1.patch989 bytesidflood
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

idflood’s picture

Status: Active » Needs review
FileSize
989 bytes
lklimek’s picture

Status: Needs review » Needs work

I'm not sure if starting session for anonymous users is a good idea - it can break some caching setups.