Deprecated function: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated

Created on 29 June 2023, over 1 year ago
Updated 28 July 2023, over 1 year ago

Problem/Motivation

After update to PHP 8.1.20 i get this error:

Deprecated function: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in GuzzleHttp\Command\Guzzle\QuerySerializer\Rfc3986Serializer->aggregate() (line 25 of /var/www/html/vendor/guzzlehttp/guzzle-services/src/QuerySerializer/Rfc3986Serializer.php)
#0 /var/www/html/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real(8192, 'http_build_quer...', '/var/www/html/v...', 25)
#1 [internal function]: _drupal_error_handler(8192, 'http_build_quer...', '/var/www/html/v...', 25)
#2 /var/www/html/vendor/guzzlehttp/guzzle-services/src/QuerySerializer/Rfc3986Serializer.php(25): http_build_query(Array, NULL, '&', 2)
#3 /var/www/html/vendor/guzzlehttp/guzzle-services/src/RequestLocation/QueryLocation.php(55): GuzzleHttp\Command\Guzzle\QuerySerializer\Rfc3986Serializer->aggregate(Array)
#4 /var/www/html/vendor/guzzlehttp/guzzle-services/src/Serializer.php(90): GuzzleHttp\Command\Guzzle\RequestLocation\QueryLocation->visit(Object(GuzzleHttp\Command\Command), Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Command\Guzzle\Parameter))
#5 /var/www/html/vendor/guzzlehttp/guzzle-services/src/Serializer.php(60): GuzzleHttp\Command\Guzzle\Serializer->prepareRequest(Object(GuzzleHttp\Command\Command), Object(GuzzleHttp\Psr7\Request))
#6 /var/www/html/vendor/guzzlehttp/command/src/ServiceClient.php(195): GuzzleHttp\Command\Guzzle\Serializer->__invoke(Object(GuzzleHttp\Command\Command))
#7 /var/www/html/vendor/guzzlehttp/command/src/ServiceClient.php(172): GuzzleHttp\Command\ServiceClient->transformCommandToRequest(Object(GuzzleHttp\Command\Command))
#8 [internal function]: GuzzleHttp\Command\ServiceClient->GuzzleHttp\Command\{closure}()
#9 /var/www/html/vendor/guzzlehttp/promises/src/Coroutine.php(71): Generator->current()
#10 /var/www/html/vendor/guzzlehttp/promises/src/Coroutine.php(86): GuzzleHttp\Promise\Coroutine->__construct(Object(Closure))
#11 /var/www/html/vendor/guzzlehttp/promises/src/functions.php(362): GuzzleHttp\Promise\Coroutine::of(Object(Closure))
#12 /var/www/html/vendor/guzzlehttp/command/src/ServiceClient.php(181): GuzzleHttp\Promise\coroutine(Object(Closure))
#13 /var/www/html/vendor/guzzlehttp/guzzle-services/src/Handler/ValidatedDescriptionHandler.php(79): GuzzleHttp\Command\ServiceClient->GuzzleHttp\Command\{closure}(Object(GuzzleHttp\Command\Command))
#14 /var/www/html/vendor/guzzlehttp/command/src/ServiceClient.php(85): GuzzleHttp\Command\Guzzle\Handler\ValidatedDescriptionHandler->GuzzleHttp\Command\Guzzle\Handler\{closure}(Object(GuzzleHttp\Command\Command))
#15 /var/www/html/vendor/guzzlehttp/command/src/ServiceClient.php(77): GuzzleHttp\Command\ServiceClient->executeAsync(Object(GuzzleHttp\Command\Command))
#16 /var/www/html/web/modules/contrib/http_client_manager/src/HttpClient.php(358): GuzzleHttp\Command\ServiceClient->execute(Object(GuzzleHttp\Command\Command))
#17 /var/www/html/web/modules/contrib/http_client_manager/src/Plugin/HttpServiceApiWrapper/HttpServiceApiWrapperBase.php(107): Drupal\http_client_manager\HttpClient->call('getCondizioniVe...', Array)
#18 /var/www/html/web/modules/custom/gey_ws_client_manager/src/Plugin/HttpServiceApiWrapper/HttpServiceApiWrapperSAP.php(445): Drupal\http_client_manager\Plugin\HttpServiceApiWrapper\HttpServiceApiWrapperBase->call('getCondizioniVe...', Array)
#19 /var/www/html/web/modules/custom/gey_commerce_price_api/src/Service/PriceService.php(73): Drupal\gey_ws_client_manager\Plugin\HttpServiceApiWrapper\HttpServiceApiWrapperSAP->getCondizioniVendita('C001003', 'G014170', 1, '1')
#20 /var/www/html/web/modules/custom/gey_commerce_price_api/src/Plugin/rest/resource/PriceResource.php(40): Drupal\gey_commerce_price_api\Service\PriceService->get('G014170', '1')
#21 [internal function]: Drupal\gey_commerce_price_api\Plugin\rest\resource\PriceResource->get('G014170', '1', Object(Symfony\Component\HttpFoundation\Request))
#22 /var/www/html/web/core/modules/rest/src/RequestHandler.php(219): call_user_func_array(Array, Array)
#23 /var/www/html/web/core/modules/rest/src/RequestHandler.php(68): Drupal\rest\RequestHandler->delegateToRestResourcePlugin(Object(Drupal\Core\Routing\RouteMatch), Object(Symfony\Component\HttpFoundation\Request), NULL, Object(Drupal\gey_commerce_price_api\Plugin\rest\resource\PriceResource))
#24 [internal function]: Drupal\rest\RequestHandler->handle(Object(Drupal\Core\Routing\RouteMatch), Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\rest\Entity\RestResourceConfig))
#25 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#26 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#27 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#28 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#29 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#30 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#31 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#39 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#40 {main}
💬 Support request
Status

Fixed

Version

9.3

Component

Code

Created by

🇮🇹Italy trickfun

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

Comments & Activities

Production build 0.71.5 2024