Wrong reference to Apache superglobal $_SERVER in rollout.module

obsidiandesign - January 2, 2008 - 05:38
Project:Roll out
Version:5.x-2.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Line 110 of rollout.module:

$sites_dir = dirname($GLOBALS['_SERVER']['SCRIPT_FILENAME']) . '/sites'; // FIXME - Is the sites folder always relative to index.php in this way

Results in an empty array for me - in fact, a print_r($GLOBALS['_SERVER']) results in an empty array as well.

Changing the code to reference $_SERVER - just like rollout_server.module does corrects the problem:

$sites_dir = dirname($_SERVER['SCRIPT_FILENAME']) . '/sites'; // FIXME - Is the sites folder always relative to index.php in this way

 
 

Drupal is a registered trademark of Dries Buytaert.