@@ -266,7 +266,9 @@ public function isAJAX(): bool
266266 */
267267 public function isSecure (): bool
268268 {
269- if (! empty ($ _SERVER ['HTTPS ' ]) && strtolower ($ _SERVER ['HTTPS ' ]) !== 'off ' ) {
269+ $ https = service ('superglobals ' )->server ('HTTPS ' );
270+
271+ if ($ https !== null && strtolower ($ https ) !== 'off ' ) {
270272 return true ;
271273 }
272274
@@ -599,9 +601,9 @@ public function getPostGet($index = null, $filter = null, $flags = null)
599601 // Use $_POST directly here, since filter_has_var only
600602 // checks the initial POST data, not anything that might
601603 // have been added since.
602- return isset ( $ _POST [ $ index])
604+ return service ( ' superglobals ' )-> post ( $ index) !== null
603605 ? $ this ->getPost ($ index , $ filter , $ flags )
604- : (isset ( $ _GET [ $ index]) ? $ this ->getGet ($ index , $ filter , $ flags ) : $ this ->getPost ($ index , $ filter , $ flags ));
606+ : (service ( ' superglobals ' )-> get ( $ index) !== null ? $ this ->getGet ($ index , $ filter , $ flags ) : $ this ->getPost ($ index , $ filter , $ flags ));
605607 }
606608
607609 /**
@@ -622,9 +624,9 @@ public function getGetPost($index = null, $filter = null, $flags = null)
622624 // Use $_GET directly here, since filter_has_var only
623625 // checks the initial GET data, not anything that might
624626 // have been added since.
625- return isset ( $ _GET [ $ index])
627+ return service ( ' superglobals ' )-> get ( $ index) !== null
626628 ? $ this ->getGet ($ index , $ filter , $ flags )
627- : (isset ( $ _POST [ $ index]) ? $ this ->getPost ($ index , $ filter , $ flags ) : $ this ->getGet ($ index , $ filter , $ flags ));
629+ : (service ( ' superglobals ' )-> post ( $ index) !== null ? $ this ->getPost ($ index , $ filter , $ flags ) : $ this ->getGet ($ index , $ filter , $ flags ));
628630 }
629631
630632 /**
0 commit comments