Slim-Psr7 icon indicating copy to clipboard operation
Slim-Psr7 copied to clipboard

$_SERVER['SERVER_PORT'] server port passed as string

Open LocalHeroPro opened this issue 2 years ago • 0 comments

On that line: https://github.com/slimphp/Slim-Psr7/blob/master/src/Uri.php#L301 I got error, because value passed is string "443". Can we cast string to int and after that check if it is good for us value? Value is passed starlight from $_SERVER['SERVER_PORT'] PHP Fatal error: Uncaught InvalidArgumentException: Uri port must be null or an integer between 1 and 65535 (inclusive) in vendor/slim/psr7/src/Uri.php:306

LocalHeroPro avatar Jul 04 '23 12:07 LocalHeroPro