- 🇨🇷Costa Rica estebanvalerio.h
Confirming that using the patch `commerce_authnet-deprecated-function-strstr-3319388-2.patch` fixes the issue
I was getting the error on `/checkout/39118/review` page
Deprecated function: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\commerce_authnet\Plugin\Commerce\PaymentGateway\OnsiteBase->getPaymentMethodCustomerId() (line 322 of modules/contrib/commerce_authnet/src/Plugin/Commerce/PaymentGateway/OnsiteBase.php). Drupal\commerce_authnet\Plugin\Commerce\PaymentGateway\OnsiteBase->getPaymentMethodCustomerId(Object) (Line: 682) Drupal\commerce_authnet\Plugin\Commerce\PaymentGateway\AcceptJs->doCreatePaymentMethod(Object, Array) (Line: 585) Drupal\commerce_authnet\Plugin\Commerce\PaymentGateway\AcceptJs->createPaymentMethod(Object, Array) (Line: 83) Drupal\commerce_payment\PluginForm\PaymentMethodAddForm->submitConfigurationForm(Array, Object) (Line: 169) Drupal\commerce_payment\Plugin\Commerce\InlineForm\PaymentGatewayForm->submitInlineForm(Array, Object) (Line: 159) Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runSubmit(Array, Object) call_user_func_array(Array, Array) (Line: 141) Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::doExecuteSubmitHandlers(Array, Object) (Line: 134) Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::doExecuteSubmitHandlers(Array, Object) (Line: 134) Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::doExecuteSubmitHandlers(Array, Object) (Line: 86) Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::executeElementSubmitHandlers(Array, Object) call_user_func_array(Array, Array) (Line: 82) Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275) Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'commerce_checkout_flow_multistep_default') (Line: 118) Drupal\Core\Form\FormValidator->validateForm('commerce_checkout_flow_multistep_default', Array, Object) (Line: 593) Drupal\Core\Form\FormBuilder->processForm('commerce_checkout_flow_multistep_default', Array, Object) (Line: 325) Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 224) Drupal\Core\Form\FormBuilder->getForm(Object, 'order_information') (Line: 143) Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50) Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Status changed to RTBC
11 months ago 12:42pm 12 January 2024 - 🇺🇸United States ericchew
I started running into this issue on my site when testing going from php 8.0 to 8.1 to prepare for D10. The patch fixes the issue for me too.
- First commit to issue fork.
- Merge request !17Issue #3319388 by vipin.j - Fix deprecated function strstr() in OnsiteBase plugin → (Merged) created by rhovland
- 🇺🇸United States rishi kulshreshtha
Encountered the same issue at checkout, the patch worked as expected.
-
jsacksick →
committed b325b3a5 on 8.x-1.x authored by
rhovland →
Issue #3319388 by vipin.j - Fix deprecated function strstr() in...
-
jsacksick →
committed b325b3a5 on 8.x-1.x authored by
rhovland →
- Status changed to Fixed
4 months ago 12:18pm 8 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.