Quote Originally Posted by bustin98 View Post
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.