@@ -177,10 +177,10 @@ public function __construct(array $config = [])
177177 'user_agent ' => $ this ->getVar ('HTTP_USER_AGENT ' ),
178178 'type ' => $ this ->getVar ('CONTENT_TYPE ' ),
179179 'length ' => intval ($ this ->getVar ('CONTENT_LENGTH ' , 0 )),
180- 'query ' => new Collection ($ _GET ?? [] ),
181- 'data ' => new Collection ($ _POST ?? [] ),
182- 'cookies ' => new Collection ($ _COOKIE ?? [] ),
183- 'files ' => new Collection ($ _FILES ?? [] ),
180+ 'query ' => new Collection ($ _GET ),
181+ 'data ' => new Collection ($ _POST ),
182+ 'cookies ' => new Collection ($ _COOKIE ),
183+ 'files ' => new Collection ($ _FILES ),
184184 'secure ' => $ scheme === 'https ' ,
185185 'accept ' => $ this ->getVar ('HTTP_ACCEPT ' ),
186186 'proxy_ip ' => $ this ->getProxyIpAddress (),
@@ -219,7 +219,7 @@ public function init(array $properties = []): self
219219 $ this ->url = '/ ' ;
220220 } else {
221221 // Merge URL query parameters with $_GET
222- $ _GET = array_merge ($ _GET ?? [] , self ::parseQuery ($ this ->url ));
222+ $ _GET = array_merge ($ _GET , self ::parseQuery ($ this ->url ));
223223
224224 $ this ->query ->setData ($ _GET );
225225 }
@@ -546,7 +546,7 @@ protected function parseRequestBodyForHttpMethods(): void
546546 $ contentType = strtolower (trim ($ this ->type ));
547547 $ isMultipart = strpos ($ contentType , 'multipart/form-data ' ) === 0 ;
548548 $ boundary = null ;
549-
549+
550550 if ($ isMultipart ) {
551551 // Extract boundary more safely
552552 if (preg_match ('/boundary=([" \']?)([^" \';,\s]+)\1/i ' , $ this ->type , $ matches )) {
0 commit comments