Download & Extend

Undefined index error in the 2.7 version

Project:Splash
Version:6.x-2.7
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

Hi.

I have a site that uses this module. I also have a mirror of this site in localhost.

For a long time I used version 2.6 and never had errors.

I recently updated to to version 2.7.

The site hosted on the Internet is working properly, but the mirror that is on localhost is with the following problem:

Notice: Undefined index: splash in C:\wamp\www\drupal\sites\all\modules\splash\splash.module on line 79

Notice: Undefined index: splash in C:\wamp\www\drupal\sites\all\modules\splash\splash.module on line 83

Notice: Trying to get property of non-object in C:\wamp\www\drupal\includes\path.inc on line 50

This message is displayed on every page of the site and how if it was not enough, in Internet Explorer 9.0, the layout is broken.

The two functions with errors (line 79 and line 83) are identical in both versions cited. I believe that some change in the rest of the code is causing these errors.

Any ideas?

Comments

#1

Same issue here.

For the Undefined index: splash, that should be an easy fix: just adding an extra check to make sure the index is set on line 79 and 83. For example: elseif (isset($_GET['splash']) && $_GET['splash'] == 'off')

Regarding the Notice: Trying to get property of non-object this issue comes from Drupal and there's a patch already submitted for this: http://drupal.org/node/908296

Sorry, I'm not sure how to add a patch yet...

#2

Getting the same error, going to try #1 fix. Thanks.

#3

I'm also getting these errors for variables 'q', 'redirect' and 'time'.

[error] [client xx.xxx.xxx.xx] PHP Notice:  Undefined index: q in /sites/all/modules/splash/splash.module on line 87
[error] [client xx.xxx.xxx.xx] PHP Notice:  Undefined index: redirect in /sites/all/modules/splash/splash.module on line 95
[error] [client xx.xxx.xxx.xx] PHP Notice:  Undefined index: time in /sites/all/modules/splash/splash.module on line 110

#4

I don't understand. Where should the text "elseif (isset($_GET['splash']) && $_GET['splash'] == 'off')" be added? In splash.module? In which line?

Thanks for your help!

#5

Category:support request» bug report

Ditto here...2.7 seems to be totally broken. And, surely (as #1 suggests) we don't need to patch core to get this module working. Any updates on it's status?

#6

+

#7

any solutions?

#8

I uninstalled for now, there seems to be issues with this module.

#9

This is the section of code I changed to eliminate the errors. It looks like on line 71, path.inc was initiated incorrectly. On lines 79 and 83, I added the isset() check to the conditional.

Starting on line 68 in the splash.module file:

<?php
 
/*** THE WHEN ***/
 
 
include_once(str_replace('index.php', '', $_SERVER['SCRIPT_FILENAME']).'includes/common.inc');
 
//include_once(str_replace('index.php', '', $_SERVER['SCRIPT_FILENAME']).'includes/path.inc');
 
drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);
  include_once(
str_replace('index.php', '', $_SERVER['SCRIPT_FILENAME']).'modules/filter/filter.module');
 
 
// No WHAT
 
if (empty($splash_what['content'])) {
   
$splash = FALSE;
   
$reason = 'No WHAT';
 
// Someone knew this special way to get around the splash :)
 
} elseif (isset($_GET['splash']) && $_GET['splash'] == 'off') {
   
$splash = FALSE;
   
$reason = 'Someone knew this special way to get around the splash';
 
// Someone knew this special way to force splash display
 
} elseif (isset($_GET['splash']) && $_GET['splash'] == 'on') {
   
$splash = TRUE;
   
$reason = 'Someone knew this special way to force splash display';
?>
nobody click here