[Bug 915] New - getvars value missing in lib/Maintenance.php

bugs@bugs.horde.org bugs@bugs.horde.org
Mon, 25 Mar 2002 02:50:39 -0400


http://bugs.horde.org/show_bug.cgi?id=915

*** shadow/915	Mon Mar 25 02:50:39 2002
--- shadow/915.tmp.13675	Mon Mar 25 02:50:39 2002
***************
*** 0 ****
--- 1,41 ----
+ Bug#: 915
+ Product: Horde
+ Version: 2.0 Stable
+ Platform: MSIE 5
+ OS/Version: Windows NT
+ Status: NEW   
+ Resolution: 
+ Severity: normal
+ Priority: P2
+ Component: Core
+ Area: BUILD
+ AssignedTo: chuck@horde.org                            
+ ReportedBy: knitterb@blandsite.org               
+ URL: 
+ Cc: knitterb@blandsite.org
+ Summary: getvars value missing in lib/Maintenance.php
+ 
+ I was getting an error at line 159 where going to the link 
+ http://somesite/horde/imp was causing an error on a brand new user stating that 
+ the variable "getvars" did not exist:
+ 
+ 
+                 if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
+                     $getvars = urlencode($HTTP_SERVER_VARS['QUERY_STRING']);
+                 }
+                 header('Location: ' . Horde::url($registry->getWebRoot
+ ('horde') . '/maintenance.php?module=' . $this->horde_module . '&getvars=' . 
+ $getvars, true));
+                 exit;
+ 
+ Alas, if you follow that logic, the variable "getvars" will only exist if the 
+ QUERY_STRING is not empty.  The problem is, though, that at the bottom of the 
+ frame, the link to the mail (http://somesite/horde/imp/) actually does not have 
+ a QUERY_STRING, meaning the next call to the "header" funciton will fail.
+ 
+ I made a change at line 143:
+ 
+ <         global $prefs, $registry, $HTTP_SERVER_VARS;
+ >         global $prefs, $registry, $HTTP_SERVER_VARS, $getvars;
+ 
+ Hope that helps out.  Otherwise, I'll leave it to you guys! :)