Deprecated function: strpos(): Passing null to parameter #1

Created on 8 February 2023, almost 2 years ago
Updated 10 February 2023, almost 2 years ago

Describe your bug or feature request.

Deprecated function: strpos(): Passing null to parameter #1
in the ProductVariationContext class, method getRuntimeContexts()

If a bug, provide steps to reproduce it from a clean install.

Errors:
Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\commerce_product\ContextProvider\ProductVariationContext->getRuntimeContexts() (line 95 of /var/www/html/backend/web/modules/contrib/commerce/modules/product/src/ContextProvider/ProductVariationContext.php) #0 /var/www/html/backend/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real(8192, 'strpos(): Passi...', '/var/www/html/b...', 95)
#1 [internal function]: _drupal_error_handler(8192, 'strpos(): Passi...', '/var/www/html/b...', 95)
#2 /var/www/html/backend/web/modules/contrib/commerce/modules/product/src/ContextProvider/ProductVariationContext.php(95): strpos(NULL, 'layout_builder')
#3 /var/www/html/backend/web/core/lib/Drupal/Core/Plugin/Context/LazyContextRepository.php(79): Drupal\commerce_product\ContextProvider\ProductVariationContext->getRuntimeContexts(Array)
#4 /var/www/html/backend/web/modules/contrib/require_login/src/LoginRequirementsManager.php(168): Drupal\Core\Plugin\Context\LazyContextRepository->getRuntimeContexts(Array)
#5 /var/www/html/backend/web/modules/contrib/require_login/src/EventSubscriber/LoginEventSubscriber.php(52): Drupal\require_login\LoginRequirementsManager->evaluate(Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#6 [internal function]: Drupal\require_login\EventSubscriber\LoginEventSubscriber->onExceptionRedirect(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#7 /var/www/html/backend/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#8 /var/www/html/backend/vendor/symfony/http-kernel/HttpKernel.php(229): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...')
#9 /var/www/html/backend/vendor/symfony/http-kernel/HttpKernel.php(92): Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException), Object(Symfony\Component\HttpFoundation\Request), 1)
#10 /var/www/html/backend/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#11 /var/www/html/backend/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /var/www/html/backend/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /var/www/html/backend/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /var/www/html/backend/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/html/backend/web/profiles/jobiqo/modules/jobiqo_graphql/src/StackMiddleware/GraphQLCache.php(99): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/backend/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(49): Drupal\jobiqo_graphql\StackMiddleware\GraphQLCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/backend/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/backend/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/backend/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/backend/web/core/lib/Drupal/Core/DrupalKernel.php(713): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/backend/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#22 {main}. (Exception)

🐛 Bug report
Status

Fixed

Version

2.33

Component

Product

Created by

🇺🇦Ukraine ooa33

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

Production build 0.71.5 2024