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

Version 8 and newer of PHP will throw an exception when $_SERVER['SERVER_NAME'] not set #17

Open
gilzow opened this issue Jan 25, 2022 · 1 comment

Comments

@gilzow
Copy link
Contributor

gilzow commented Jan 25, 2022

We set $requestUrl = false; at line 96 in platformsh-laravel-env.php. $requestUrl is then used as the needle in strpos() at line 105. If $_SERVER['SERVER_NAME'] is not set, requestUrl remains false. In versions of PHP before 8, a deprecation notice is triggered, but the code will still function. However, from PHP8 onward, this throws a fatal error.

gilzow added a commit to gilzow/laravel-bridge that referenced this issue Jan 26, 2022
… strpos as of v8 of php no longer accepts anything other than a string for needle. Closes platformsh#17
@budda
Copy link

budda commented Aug 1, 2022

Is this going to get fixed?
Just go tripped up by this...

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.

2 participants