X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=functions%2Fglobal.php;h=634d9d38f1a9521a0884c7bd96507aac2c5b0d8e;hb=ee27709d9224cc01e605c2478de9d9e4dd41f84c;hp=7b47de742fe23d99015314b5675a4d621e926bfe;hpb=6c84ba1ec45ab854c37b6f65c5b4d84ab1c7aad4;p=squirrelmail.git diff --git a/functions/global.php b/functions/global.php index 7b47de74..634d9d38 100644 --- a/functions/global.php +++ b/functions/global.php @@ -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 +?>