Index: C:/eZpublish/www/ezp_trunk/lib/ezutils/classes/ezhttptool.php =================================================================== --- C:/eZpublish/www/ezp_trunk/lib/ezutils/classes/ezhttptool.php (revision 18402) +++ C:/eZpublish/www/ezp_trunk/lib/ezutils/classes/ezhttptool.php (working copy) @@ -73,12 +73,12 @@ \return a reference to the HTTP post variable $var, or null if it does not exist. \sa variable */ - function postVariable( $var ) + function postVariable( $var, $fallbackValue = null ) { - $ret = null; + $ret = $fallbackValue; if ( isset( $_POST[$var] ) ) $ret = $_POST[$var]; - else + else if ( $ret == null ) eZDebug::writeWarning( "Undefined post variable: $var", "eZHTTPTool" ); return $ret; @@ -106,12 +106,12 @@ \return a reference to the HTTP get variable $var, or null if it does not exist. \sa variable */ - function getVariable( $var ) + function getVariable( $var, $fallbackValue = null ) { - $ret = null; + $ret = $fallbackValue; if ( isset( $_GET[$var] ) ) $ret = $_GET[$var]; - else + else if ( $ret == null ) eZDebug::writeWarning( "Undefined get variable: $var", "eZHTTPTool" ); return $ret; @@ -147,7 +147,7 @@ \return a reference to the HTTP post/get variable $var, or null if it does not exist. \sa postVariable */ - function variable( $var ) + function variable( $var, $fallbackValue = null ) { if ( isset( $_POST[$var] ) ) { @@ -157,7 +157,10 @@ { return $_GET[$var]; } - $ret = false; + $ret = $fallbackValue; + if ( $ret == null ) + eZDebug::writeWarning( "Undefined post/get variable: $var", + "eZHTTPTool" ); return $ret; }