change default reply citation site, it's better to have by default an
[squirrelmail.git] / functions / global.php
index 573a0e1bc6964c8d2a1d0240f7b39fa9df08861d..634d9d38f1a9521a0884c7bd96507aac2c5b0d8e 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * global.php
  *
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * This includes code to update < 4.1.0 globals to the newer format
@@ -185,6 +185,9 @@ define('SQ_FORM',6);
  *    sqgetGlobalVar('username',$username,SQ_SESSION);
  *  -- no quotes around last param!
  *
+ * WARNING: Since 1.4.5 and 1.5.1 function nulls $value, 
+ * if variable is not available.
+ *
  * @param string name the name of the var to search
  * @param mixed value the variable to return
  * @param int search constant defining where to look
@@ -237,6 +240,8 @@ function sqgetGlobalVar($name, &$value, $search = SQ_INORDER) {
         }
         break;
     }
+    /* Nothing found, reset $value and return FALSE */
+    $value = null;
     return FALSE;
 }
 
@@ -287,4 +292,4 @@ function sqsession_is_active() {
 }
 
 // vim: et ts=4
-?>
\ No newline at end of file
+?>