PHP 8.1 - Deprecated function: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated

Created on 22 May 2024, 7 months ago
Updated 17 July 2024, 5 months ago

Problem/Motivation

Complete warning:

Deprecated function: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\Core\EventSubscriber\RssResponseRelativeUrlFilter->onResponse() (line 24 of /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php) #0 /mnt/www/html/myproject/docroot/core/includes/bootstrap.inc(164): _drupal_error_handler_real(8192, 'stripos(): Pass...', '/mnt/www/html/d...', 24) #1 [internal function]: _drupal_error_handler(8192, 'stripos(): Pass...', '/mnt/www/html/d...', 24) #2 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php(24): stripos(NULL, 'application/rss...') #3 [internal function]: Drupal\Core\EventSubscriber\RssResponseRelativeUrlFilter->onResponse(Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #4 /mnt/www/html/myproject/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #5 /mnt/www/html/myproject/vendor/symfony/http-kernel/HttpKernel.php(214): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response') #6 /mnt/www/html/myproject/vendor/symfony/http-kernel/HttpKernel.php(202): Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object(Symfony\Component\HttpFoundation\BinaryFileResponse), Object(Symfony\Component\HttpFoundation\Request), 1) #7 /mnt/www/html/myproject/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #8 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #9 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #10 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #11 /mnt/www/html/myproject/vendor/asm89/stack-cors/src/Cors.php(53): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 /mnt/www/html/myproject/docroot/modules/contrib/shield/src/ShieldMiddleware.php(270): Asm89\Stack\Cors->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 /mnt/www/html/myproject/docroot/modules/contrib/shield/src/ShieldMiddleware.php(226): Drupal\shield\ShieldMiddleware->bypass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\shield\ShieldMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /mnt/www/html/myproject/docroot/modules/contrib/http_headers_cleaner/src/Middleware/HttpHeadersCleanerMiddleware.php(55): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\http_headers_cleaner\Middleware\HttpHeadersCleanerMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /mnt/www/html/myproject/docroot/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /mnt/www/html/myproject/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #21 @main.

Steps to reproduce

Open an image style

	https://dev-www.schaer.com/sites/default/files/styles/teaser_vertical/public/2022-12/landscape-demo-image_3.jpg.webp?itok=b3WpWT83

Proposed resolution

The solution can be the same of issue #3324560 or #3348391

๐Ÿ› Bug report
Status

Postponed: needs info

Version

11.0 ๐Ÿ”ฅ

Component
Otherย  โ†’

Last updated about 6 hours ago

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain eduardo morales alberti Spain, ๐Ÿ‡ช๐Ÿ‡บ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024