Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Join Date
    Oct 2009
    Posts
    425
    Plugin Contributions
    0

    Default Re: A couple of PHP Warnings

    Thanks Cindy for the code....and yes (sorry) I am running v.2.1

    I will implement this code and let you know tomorrow how it all works out!

  2. #12
    Join Date
    Oct 2009
    Posts
    425
    Plugin Contributions
    0

    Default Re: A couple of PHP Warnings

    Here is another of the PHP Warnings that I get in Debug Log....hoping you will be able to help with this one as well.....

    Request URI: /shop/index.php?main_page=shopping_cart&action=update_product, IP address: 97.154.151.109, Language id 1
    #0 /home/public_html/shop/includes/classes/shopping_cart.php(2669): zen_debug_error_handler()
    #1 /home/public_html/shop/includes/classes/shopping_cart.php(1784): shoppingCart->in_cart_product_mixed_changed()
    #2 /home/public_html/shop/includes/main_cart_actions.php(50): shoppingCart->actionUpdateProduct()
    #3 /home/public_html/shop/includes/init_includes/init_cart_handler.php(42): require('...')
    #4 /home/public_html/shop/includes/autoload_func.php(40): require_once('...')
    #5 /home/public_html/shop/includes/application_top.php(329): require('...')
    #6 /home/public_html/shop/index.php(25): require('...')
    --> PHP Warning: Undefined array key 1 in /home/public_html/shop/includes/classes/shopping_cart.php on line 2669.

    [26-Mar-2025 14:55:40 America] Request URI: /shop/index.php?main_page=shopping_cart&action=update_product, IP address: 97.154.151.109, Language id 1
    #0 /home/public_html/shop/includes/classes/shopping_cart.php(2669): zen_debug_error_handler()
    #1 /home/public_html/shop/includes/classes/shopping_cart.php(1784): shoppingCart->in_cart_product_mixed_changed()
    #2 /home/public_html/shop/includes/main_cart_actions.php(50): shoppingCart->actionUpdateProduct()
    #3 /home/public_html/shop/includes/init_includes/init_cart_handler.php(42): require('...')
    #4 /home/public_html/shop/includes/autoload_func.php(40): require_once('...')
    #5 /home/public_html/shop/includes/application_top.php(329): require('...')
    #6 /home/public_html/shop/index.php(25): require('...')
    --> PHP Warning: Undefined array key 2 in /home/public_html/shop/includes/classes/shopping_cart.php on line 2669.

    Thank you for your help!

  3. #13
    Join Date
    Oct 2009
    Posts
    425
    Plugin Contributions
    0

    Default Re: A couple of PHP Warnings

    Quote Originally Posted by lat9 View Post
    Since you didn't say, I'm assuming that you're running zc210.

    Try editing /includes/modules/payment/paypaldp.php, changing line 1645 from
    Code:
            if (isset($GLOBALS[$module]) && $GLOBALS[$module]->tax_class > 0) {
    to
    Code:
            if (($GLOBALS[$module]->tax_class ?? 0) > 0) {
    and let me know if that corrects the issue; if so, I'll get that updated on the Zen Cart GitHub.
    I have now had this code changed for 24 hours with several orders coming through....all works perfectly with no Debug Logs or errors.
    Thanks for your help!

  4. #14
    Join Date
    Oct 2009
    Posts
    425
    Plugin Contributions
    0

    Default Re: A couple of PHP Warnings

    Lastly...I have one more Debug Log to share with a PHP Warning. If you could take a look and let me know what code changes are needed to mitigate the warning.

    Request URI: /shop/ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 8.18.235.206, Language id 1
    #0 /home/public_html/shop/includes/templates/custom/templates/tpl_ajax_checkout_confirmation_default.php(35): zen_debug_error_handler()
    #1 /home/public_html/shop/includes/classes/ajax/zcAjaxPayment.php(191): require_once('...')
    #2 /home/public_html/shop/ajax.php(77): zcAjaxPayment->prepareConfirmation()
    --> PHP Warning: Undefined global variable $ in /home/public_html/shop/includes/templates/custom/templates/tpl_ajax_checkout_confirmation_default.php on line 35.

    [28-Mar-2025 06:04:36 America] Request URI: /shop/ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 8.18.235.206, Language id 1
    #0 /home/public_html/shop/includes/templates/custom/templates/tpl_ajax_checkout_confirmation_default.php(35): zen_debug_error_handler()
    #1 /home/public_html/shop/includes/classes/ajax/zcAjaxPayment.php(191): require_once('...')
    #2 /home/public_html/shop/ajax.php(77): zcAjaxPayment->prepareConfirmation()
    --> PHP Warning: Attempt to read property "title" on null in /home/public_html/shop/includes/templates/custom/templates/tpl_ajax_checkout_confirmation_default.php on line 35.


    Thanks again for your help and hope this help with future updates.

  5. #15
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,363
    Plugin Contributions
    94

    Default Re: A couple of PHP Warnings

    Quote Originally Posted by NWCE View Post
    I have now had this code changed for 24 hours with several orders coming through....all works perfectly with no Debug Logs or errors.
    Thanks for your help!
    See this Zen Cart GitHub PR for the proposed correction: https://github.com/zencart/zencart/pull/7043

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v210 A Couple of PHP Warnings On Checkout
    By NWCE in forum Managing Customers and Orders
    Replies: 5
    Last Post: 21 Mar 2025, 06:23 PM
  2. v157 PHP Warnings and Fatal errors after upgrading to PHP 8
    By bigandrew in forum General Questions
    Replies: 9
    Last Post: 29 Jul 2021, 05:31 PM
  3. v156 PHP 7.3 preg_xxxxx Warnings
    By mc12345678 in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 28 Jun 2019, 01:41 PM
  4. Replies: 38
    Last Post: 1 Nov 2018, 09:28 PM
  5. PHP warnings
    By LEP in forum General Questions
    Replies: 4
    Last Post: 6 Jun 2006, 10:31 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR