Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
LocalHeroPro opened this issue Jul 4, 2023 · 0 comments · Fixed by #295
Closed

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

LocalHeroPro opened this issue Jul 4, 2023 · 0 comments · Fixed by #295

Comments

@LocalHeroPro
Copy link

LocalHeroPro commented Jul 4, 2023

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 LocalHeroPro changed the title $_SERVER['SERVER_PORT'] passed as string $_SERVER['SERVER_PORT'] server port passed as string Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant