-
Notifications
You must be signed in to change notification settings - Fork 39
-
Notifications
You must be signed in to change notification settings - Fork 39
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
PHP 8.1 and backdrop_is_cli() #5872
Closed
Labels
Milestone
Comments
This was referenced Dec 2, 2022
While a temporary workaround has been added to bee, this change is still required as at the moment, there are functions in |
backdrop-ci
referenced
this issue
in backdrop/backdrop
Jan 9, 2023
backdrop-ci
referenced
this issue
in backdrop/backdrop
Jan 9, 2023
Merged backdrop/backdrop#4265 into 1.x and 1.23.x. Thanks @yorkshire-pudding! |
15 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug
When getting
bee
ready for PHP 8.1, we set$_SERVER['SERVER_SOFTWARE'] = ''
rather than$_SERVER['SERVER_SOFTWARE'] = NULL
as several functions incore/includes/bootstrap.inc
usepreg_match()
which under PHP 8.1 will not acceptNULL
as a string.We get deprecation notices:
preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- see backdrop-contrib/bee#222Hence why we changed to
$_SERVER['SERVER_SOFTWARE'] = ''
However,
backdrop_is_cli()
does not evaluate''
to being!isset()
and this (tracked down by @indigoxela ) then causesbee
to freeze when the command would generate a prompt for the user to confirm an action.See:
If the function could be changed to:
Then this would work whether the value was
NULL
or''
PR added - backdrop/backdrop#4265
The text was updated successfully, but these errors were encountered: