- Issue created by @Jaykumar95
- Status changed to Needs review
over 1 year ago 8:29am 27 February 2023 The last submitted patch, 3: core-3344629-check-values-before-using-strpos-3.patch, failed testing. View results →
- Status changed to Needs work
over 1 year ago 12:45pm 27 February 2023 - Status changed to Needs review
over 1 year ago 12:48pm 27 February 2023 - 🇮🇳India Jaykumar95 Ahmedabad
attached patch #5 while follow up on #3 failed in test.
The last submitted patch, 5: core-3344629-check-values-before-using-strpos-5.patch, failed testing. View results →
- Status changed to Needs work
over 1 year ago 2:21pm 7 March 2023 - 🇮🇳India Akram Khan Cuttack, Odisha
added updated patch and try to fix CCF of MR #14
- Status changed to Needs review
over 1 year ago 6:03pm 8 March 2023 - Status changed to Needs work
over 1 year ago 7:49pm 10 March 2023 - 🇺🇸United States smustgrave
Think it would worth figuring out what is calling with the empty parameter vs putting the check in. This could be bad code somewhere that should be fixed.
Either way will need a test case.
@smustgrave null is coming from public function get when headers[0] == NULL which is in vendor folder vendor/symfony/http-foundation/HeaderBag.php online 118 how we can change it ad it's not in code base ?
- 🇳🇱Netherlands bbrala Netherlands
I think smustgrave is right. We need to know why there is a response that is built without any headers. That is pretty weird.
We really need to be able to reproduce this in a way, preferably in a test.
- 🇨🇭Switzerland berdir Switzerland
We're seeing this on image generation when adding a webp convert effect to an image style. Agree that there might be an underlying bug about not sending a proper content type in that case, but this seems like something we should just be more defensive about without requiring tests.
I think a simpler fix would be to use $response->headers->get('Content-Type') ?? '' if we can't rely on the default value behaviour in symfony.
- 🇷🇸Serbia pivica
> We're seeing this on image generation when adding a webp convert effect to an image style
In our case this was a bug in update function, so having this notice helped identifying that there is a problem in the first place.
- 🇮🇹Italy p4trizio Como
For some reasons, this patch is already in Drupal 10.1.x
I upgraded a website using this patch from D9 to D10.1 and the patch was obviously failing. - 🇺🇸United States smustgrave
If issue is no longer a problem in D10.1 we can close out!
- last update
about 1 year ago 28,526 pass - last update
about 1 year ago 29,672 pass - 🇭🇺Hungary Sweetchuck Budapest
I ran into a very similar issue.
\Drupal\jsonapi\Eventsubscriber\ResourceResponseValidator line 104
str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated
$response->headers->all() =
[ 'cache-control' => ['no-cache, private'], 'date' => ['bla bla'], 'content-type' => [null], 'x-drupal-dynamic-cache' => ['UNCACHEABLE'], ];
- 🇭🇺Hungary Sweetchuck Budapest
Patch #5 took care of three occurrences
- ActiveLinkResponseFilter
- RssResponseRelativeUrlFilter
- ResourceResponseValidator
Patch #29 for an unknown reason do nothing with ResourceResponseValidator.
- last update
about 1 year ago Patch Failed to Apply - 🇺🇸United States jrb Raleigh-Durham Area, NC, USA
In our case, we were seeing the 3 deprecation messages when an anonymous user tried to access a Data Export display of a View that required authentication.
The patch in #32 fixes the issue.