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

Created on 25 July 2022, almost 2 years ago
Updated 20 March 2023, over 1 year ago

To reproduce upgraded from 8.15 to 8.x-1.x-dev
Using PHP 8.1.8
Receiving the following errors:

Problem/Motivation

Deprecated function: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\pwa\EventSubscriber\ResponseSubscriber->processResponse() (line 50 of /home/mysite/public_html/modules/contrib/pwa/src/EventSubscriber/ResponseSubscriber.php)
#0 /home/mysite/public_html/core/includes/bootstrap.inc(347): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /home/mysite/public_html/modules/contrib/pwa/src/EventSubscriber/ResponseSubscriber.php(50): stripos()
#3 [internal function]: Drupal\pwa\EventSubscriber\ResponseSubscriber->processResponse()
#4 /home/mysite/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#5 /home/mysite/public_html/vendor/symfony/http-kernel/HttpKernel.php(191): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#6 /home/mysite/public_html/vendor/symfony/http-kernel/HttpKernel.php(245): Symfony\Component\HttpKernel\HttpKernel->filterResponse()
#7 /home/mysite/public_html/vendor/symfony/http-kernel/HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
#8 /home/mysite/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#9 /home/mysite/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#10 /home/mysite/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#11 /home/mysite/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#12 /home/mysite/public_html/modules/contrib/advban/src/AdvbanMiddleware.php(57): Drupal\page_cache\StackMiddleware\PageCache->handle()
#13 /home/mysite/public_html/core/modules/ban/src/BanMiddleware.php(50): Drupal\advban\AdvbanMiddleware->handle()
#14 /home/mysite/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#15 /home/mysite/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#16 /home/mysite/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#17 /home/mysite/public_html/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#18 /home/mysite/public_html/index.php(19): Drupal\Core\DrupalKernel->handle()
#19 {main}

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024