Empty numeric values should default to 0

This commit is contained in:
Jonathan Ernst
2006-07-07 16:01:26 +00:00
committed by WineHQ
parent 07d12874d8
commit 8048e97846

View File

@@ -17,6 +17,8 @@ function filter_gpc()
case "f": // float
if(is_numeric($_REQUEST[$aKeys[$i]]))
$aClean[$aKeys[$i]] = $_REQUEST[$aKeys[$i]];
elseif(empty($_REQUEST[$aKeys[$i]]))
$aClean[$aKeys[$i]] = 0;
else
util_show_error_page_and_exit("Fatal error: ".$aKeys[$i]." should be a numeric value.");
break;