Browse Source

fixed getParams() with force_std_separator (was adding a "" => "" binding if not GET params)

Nicolas Cannasse 17 years ago
parent
commit
81c2733680
1 changed files with 4 additions and 1 deletions
  1. 4 1
      std/php/Web.hx

+ 4 - 1
std/php/Web.hx

@@ -15,7 +15,10 @@ class Web {
 		if(untyped __call__("get_magic_quotes_gpc"))
 			untyped __php__("foreach($a as $k => $v) $a[$k] = stripslashes($v)");
 		var h = Lib.hashOfAssociativeArray(a);
-		for( p in ~/[;&]/.split(getParamsString()) ) {
+		var params = getParamsString();
+		if( params == "" )
+			return h;
+		for( p in ~/[;&]/.split(params) ) {
 			var a = p.split("=");
 			var n = a.shift();
 			h.set(StringTools.urlDecode(n),StringTools.urlDecode(a.join("=")));