Deprecated function: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in Mobile_Detect->match() (line 1461 of ../Mobile_Detect.php)

Created on 20 November 2022, about 2 years ago
Updated 19 July 2023, over 1 year ago

Drupal 9 website's log started to fill in with the PHP notice in title and the following backtrace information:

#0 /home/username/live/public_html/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /home/username/live/public_html/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php(1461): preg_match()
#3 /home/username/live/public_html/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php(1314): Mobile_Detect->match()
#4 /home/username/live/public_html/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php(1383): Mobile_Detect->matchDetectionRulesAgainstUA()
#5 /home/username/live/public_html/web/modules/contrib/mobile_detect/src/Cache/Context/IsMobileCacheContext.php(41): Mobile_Detect->isMobile()
#6 /home/username/live/public_html/web/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php(118): Drupal\mobile_detect\Cache\Context\IsMobileCacheContext->getContext()
#7 /home/username/live/public_html/web/core/lib/Drupal/Core/Render/RenderCache.php(317): Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys()
#8 /home/username/live/public_html/web/core/lib/Drupal/Core/Render/RenderCache.php(93): Drupal\Core\Render\RenderCache->createCacheID()
#9 /home/username/live/public_html/web/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php(127): Drupal\Core\Render\RenderCache->set()
#10 /home/username/live/public_html/web/core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php(200): Drupal\Core\Render\PlaceholderingRenderCache->set()
#11 [internal function]: Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber->onResponse()
#12 /home/username/live/public_html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#13 /home/username/live/public_html/vendor/symfony/http-kernel/HttpKernel.php(202): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#14 /home/username/live/public_html/vendor/symfony/http-kernel/HttpKernel.php(190): Symfony\Component\HttpKernel\HttpKernel->filterResponse()
#15 /home/username/live/public_html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#16 /home/username/live/public_html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#17 /home/username/live/public_html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#18 /home/username/live/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#19 /home/username/live/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#20 /home/username/live/public_html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#21 /home/username/live/public_html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#22 /home/username/live/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#23 /home/username/live/public_html/web/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php(166): Stack\StackedHttpKernel->handle()
#24 /home/username/live/public_html/web/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php(122): Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber->makeSubrequest()
#25 /home/username/live/public_html/web/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php(109): Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber->on404()
#26 [internal function]: Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase->onException()
#27 /home/username/live/public_html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#28 /home/username/live/public_html/vendor/symfony/http-kernel/HttpKernel.php(229): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#29 /home/username/live/public_html/vendor/symfony/http-kernel/HttpKernel.php(92): Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
#30 /home/username/live/public_html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#31 /home/username/live/public_html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#32 /home/username/live/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#33 /home/username/live/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch()
#34 /home/username/live/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup()
#35 /home/username/live/public_html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#36 /home/username/live/public_html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#37 /home/username/live/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#38 /home/username/live/public_html/web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#39 /home/username/live/public_html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#40 {main}
πŸ› Bug report
Status

Closed: cannot reproduce

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States AltaGrade

Live updates comments and jobs are added and updated live.
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.71.5 2024