-
Notifications
You must be signed in to change notification settings - Fork 6
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
determineCanonicalRootUrl may cause crash in PHP 8.1 #12
Comments
Specifically the problem appears to be with parse_url using the PHP_URL_PATH option. There is no terminal '/' character from the determineCanonicalRootUrl result. It looks like it gets stripped in that method, then parse_url returns null, which crashes urldecode in php 8.1. I'm using https://localhost:8888/ as my APP_PUBLIC_URL. |
Thank you! I don’t think PHP 8.x handles paths and hosts different from PHP 7.x with You’re probably talking about Which of the following three lines is failing exactly, and where is the cause of the error in your opinion?
(By the way, any chance you could let this run on port 80 instead of 888?) |
The easiest fix for php 8.1 would be to just coalesce with an empty string like this:
Apologies, but I haven't traced the issue through the |
Thanks! I would include the null check, sure, but it would be good to know where exactly it fails and why, and actually understand the behavior and what we want. As I said, |
Maybe this has always been a bug that never caused any problems. It looks like |
For some reason determineCanonicalRootUrl(false) returned a null. In the constructor of App, calling urldecode(null) causes a crash in php 8.1. While I'm working to fix my problem with determineCanonicalRootUrl, a crash can be avoided by coalescing urldecode(null ?? '').
The text was updated successfully, but these errors were encountered: