Forums / Built-in Shipping and Payment Modules / Ver 2.2.2 Depreciation error in Authorizenet.php

Ver 2.2.2 Depreciation error in Authorizenet.php

Views: 827

Results 1 to 3 of 3
7 May 2026, 9:03 PM
#1
bustin98 avatar

bustin98

New Zenner

Join Date:
Jul 2019
Location:
Norwalk, Ohio
Posts:
12
Plugin Contributions:
0

Ver 2.2.2 Depreciation error in Authorizenet.php

I am using a fresh install of Ver 2.2.2
PHP 8.5

I have the following error:

[07-May-2026 20:07:11 UTC] Request URI: /catalog/index.php?main_page=checkout_process&action=confirm, IP address: x.x.x.x, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /home/vxbmhfgk/public_html/catalog/includes/modules/payment/authorizenet.php(680): preg_replace()
#2 /home/vxbmhfgk/public_html/catalog/includes/modules/payment/authorizenet.php(437): authorizenet->_debugActions()
#3 /home/vxbmhfgk/public_html/catalog/includes/classes/payment.php(382): authorizenet->before_process()
#4 /home/vxbmhfgk/public_html/catalog/includes/modules/checkout_process.php(110): payment->before_process()
#5 /home/vxbmhfgk/public_html/catalog/includes/modules/pages/checkout_process/header_php.php(13): require('/home/vxbmhfgk/...')
#6 /home/vxbmhfgk/public_html/catalog/index.php(40): require('/home/vxbmhfgk/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/vxbmhfgk/public_html/catalog/includes/modules/payment/authorizenet.php on line 680.

Current code is

$sql = $db->bindVars($sql, ':orderID', preg_replace('/[^0-9]/', '', $insert_id), 'integer');

I updated the code to

$sql = $db->bindVars($sql, ':orderID', preg_replace('/[^0-9]/', '', $insert_id ?? ''), 'integer');

But it seems to be concerning that $insert_id is null.

Is this a normal behavior and I need to alter the logging params, or is this indicating an issue elsewhere?

7 May 2026, 9:33 PM
#2
bustin98 avatar

bustin98

New Zenner

Join Date:
Jul 2019
Location:
Norwalk, Ohio
Posts:
12
Plugin Contributions:
0

Re: Ver 2.2.2 Depreciation error in Authorizenet.php

I am going to reduce to Cart 2.1.0. There are other issues, like FL tx mention during checkout, even though I removed the tax rate.

7 May 2026, 11:38 PM
#3
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,970
Plugin Contributions:
8

Re: Ver 2.2.2 Depreciation error in Authorizenet.php

bustin98:

I am using a fresh install of Ver 2.2.2
PHP 8.5

I have the following error:

[07-May-2026 20:07:11 UTC] Request URI: /catalog/index.php?main_page=checkout_process&action=confirm, IP address: x.x.x.x, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /home/vxbmhfgk/public_html/catalog/includes/modules/payment/authorizenet.php(680): preg_replace()
#2 /home/vxbmhfgk/public_html/catalog/includes/modules/payment/authorizenet.php(437): authorizenet->_debugActions()
#3 /home/vxbmhfgk/public_html/catalog/includes/classes/payment.php(382): authorizenet->before_process()
#4 /home/vxbmhfgk/public_html/catalog/includes/modules/checkout_process.php(110): payment->before_process()
#5 /home/vxbmhfgk/public_html/catalog/includes/modules/pages/checkout_process/header_php.php(13): require('/home/vxbmhfgk/...')
#6 /home/vxbmhfgk/public_html/catalog/index.php(40): require('/home/vxbmhfgk/...')
--> PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/vxbmhfgk/public_html/catalog/includes/modules/payment/authorizenet.php on line 680.

Current code is

$sql = $db->bindVars($sql, ':orderID', preg_replace('/[^0-9]/', '', $insert_id), 'integer');

I updated the code to

$sql = $db->bindVars($sql, ':orderID', preg_replace('/[^0-9]/', '', $insert_id ?? ''), 'integer');

But it seems to be concerning that $insert_id is null.

Is this a normal behavior and I need to alter the logging params, or is this indicating an issue elsewhere?

i will go that this is normal behavior.

if you look at line 672, you are storing data in the auth table in the database. whether this is necessary in a production, i can not say....

from above you can see that was called from line 437, which is part of the method, before_process.

now, in general, $insert_id is used for the order number; however, in reality, i believe it is the last index of the most recent database insert.

during the method call before process, nothing has been inserted into the database, and no order id has been created.

so this is normal behavior, and in reality a bug that should be corrected.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.