We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4404f5e commit 6fa9bdcCopy full SHA for 6fa9bdc
resources/lib/UnityHTTPD.php
@@ -238,11 +238,8 @@ public static function getPostData(string $key): mixed
238
/* returns null if not found and not $throw_if_not_found */
239
public static function getQueryParameter(string $key, bool $throw_if_not_found = true): mixed
240
{
241
- if (isset($_GET)) {
242
- self::badRequest('$_GET is unset');
243
- }
244
- if ($_GET === null) {
245
- self::badRequest('$_GET is null');
+ if (!is_array($_GET)) {
+ throw new RuntimeException('$_GET is not an array!');
246
}
247
if (!array_key_exists($key, $_GET)) {
248
if ($throw_if_not_found) {
0 commit comments