Closed (fixed)
Project:
Drupal core
Version:
9.5.x-dev
Component:
file.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 May 2022 at 19:14 UTC
Updated:
11 Nov 2022 at 09:39 UTC
Jump to comment: Most recent
Comments
Comment #2
cilefen commented@Berdir:
I think that rather than the null coalesce operator the second parameter to
\Drupal::request()->server->get()should be set to an empty string. Agree?Comment #3
berdirThat's fine too, although I have just recently come across a really weird case in the Symfony Request class where a key was set to NULL explicitly and then the fallback didn't work because Symfony uses arary_key_exists() for the fallback and explicitly "supports" NULL elements.
Comment #6
rizzie commentedComment #7
cilefen commentedI am adding myself a mentor credit for walking @rizzie through this.
Comment #8
claudiu.cristeaI hit this with 8.1. Tested and works as it should, thanks. I think it's a bug and could be merged in 9.4.x.
Comment #9
xjmCan we get an inline comment explaining why this is necessary? Otherwise it might get "cleaned up" in the future. :) Thanks!
Comment #10
xjmComment #11
chrisdarke commentedThis issue is tagged for first time contributors at DrupalCon Prague 2022.
Comment #12
chrisdarke commentedComment #13
flowweb commentedhi from drupalcon2022! It's my firt time contributor and i want to test contribute for this issue
Comment #14
berdir@floWweb: Great. This is a good first time task to actually make the change, but maybe coming up with the description not quite as much. I would say that it should mention that server software might not be set in a CLI environment and we ensure that it is a string for the regular expression check below.
Comment #15
claudiu.cristeaComment #17
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!