Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2019
    Location
    Norwalk, Ohio
    Posts
    12
    Plugin Contributions
    0

    Default 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?

  2. #2
    Join Date
    Jul 2019
    Location
    Norwalk, Ohio
    Posts
    12
    Plugin Contributions
    0

    Default 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.

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,909
    Plugin Contributions
    13

    Default Re: Ver 2.2.2 Depreciation error in Authorizenet.php

    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.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 

Similar Threads

  1. v155 Hope misunderstanding on php ver 5.6
    By brunello in forum Upgrading to 1.5.x
    Replies: 5
    Last Post: 10 Apr 2020, 08:53 PM
  2. Replies: 14
    Last Post: 4 May 2012, 10:30 AM
  3. ver. 1.3.6 coupon_admin.php error (didn't upgrade all files properly)
    By covone in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 28 Oct 2006, 06:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg