Browse Source

Only allow querystring arguments to be processed as NULL, TRUE, and FALSE constants

Jose Diaz-Gonzalez 11 years ago
parent
commit
acceb13f10
1 changed files with 10 additions and 10 deletions
  1. 10 10
      src/Core/StaticConfigTrait.php

+ 10 - 10
src/Core/StaticConfigTrait.php

@@ -198,6 +198,16 @@ trait StaticConfigTrait {
 
 		parse_str($query, $queryArgs);
 
+		foreach ($queryArgs as $key => $value) {
+			if ($value === 'true') {
+				$queryArgs[$key] = true;
+			} elseif ($value === 'false') {
+				$queryArgs[$key] = false;
+			} elseif ($value === 'null') {
+				$queryArgs[$key] = null;
+			}
+		}
+
 		if (isset($parsed['user'])) {
 			$parsed['username'] = $parsed['user'];
 		}
@@ -218,16 +228,6 @@ trait StaticConfigTrait {
 			}
 		}
 
-		foreach ($config as $key => $value) {
-			if ($value === 'true') {
-				$config[$key] = true;
-			} elseif ($value === 'false') {
-				$config[$key] = false;
-			} elseif ($value === 'null') {
-				$config[$key] = null;
-			}
-		}
-
 		return $config;
 	}