Forums / Bug Reports / A few of PHP Warnings

A few of PHP Warnings

Views: 1,161

Results 1 to 3 of 3
29 Mar 2025, 1:11 PM
#1
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

A few of PHP Warnings

I am running Zen Cart v.2.1 and have a couple of PHP Warnings in my Debug Logs commonly that I wanted to post to help with future updates. I know that they're not causing any operational issues....but if someone could post the code fixes, I would appreciate it!

#1
Request URI: /shop/ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 73.67.41.68, 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 09:05:44 America] Request URI: /shop/ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 73.67.41.68, 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.

and also I get this warning when updating a customer's order (as I sell digital downloads)
#2
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.

lastly, I received this PHP warning when a customer uses a coupon code in the Discount Coupon area during checkout, to get the product for free

#3
Request URI: /shop/index.php?main_page=checkout_process, IP address: 66.61.47.189, Language id 1
#0 /home/shop/includes/modules/payment/paypaldp.php(1645): zen_debug_error_handler()
#1/home/public_html/shop/includes/modules/payment/paypaldp.php(744): paypaldp->getLineItemDetails()
#2 /home/public_html/shop/includes/classes/payment.php(350): paypaldp->before_process()
#3 /home/public_html/shop/includes/modules/checkout_process.php(98): payment->before_process()
#4 /home/public_html/shop/includes/modules/pages/checkout_process/header_php.php(13): require('...')
#5 /home/public_html/shop/index.php(35): require('...')
--> PHP Warning: Undefined global variable $free in /home/public_html/shop/includes/modules/payment/paypaldp.php on line 1645.

[26-Mar-2025 08:45:43 America] Request URI: /shop/index.php?main_page=checkout_process, IP address: 66.61.47.189, Language id 1
#0 /home/public_html/shop/includes/modules/payment/paypaldp.php(1645): zen_debug_error_handler()
#1 /home/public_html/shop/includes/modules/payment/paypaldp.php(744): paypaldp->getLineItemDetails()
#2 /home/public_html/shop/includes/classes/payment.php(350): paypaldp->before_process()
#3 /home/public_html/shop/includes/modules/checkout_process.php(98): payment->before_process()
#4 /home/public_html/shop/includes/modules/pages/checkout_process/header_php.php(13): require('...')
#5 /home/public_html/shop/index.php(35): require('...')
--> PHP Warning: Attempt to read property "tax_class" on null in /home/public_html/shop/includes/modules/payment/paypaldp.php on line 1645.

Thanks for your help...and hope these help with future updates.

29 Mar 2025, 1:19 PM
#2
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: A few of PHP Warnings

Couple of things.

I don't think this should have been posted in Bug Reports.
You have posted multiple times in multiple threads on the same issue. It's worth re-reading the Posting Tips - particularly the first line.

Simon

29 Mar 2025, 1:23 PM
#3
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: A few of PHP Warnings

Thanks simon1066 for the reply. I have posted these a 2nd time as I thought posting them in the first thread was the wrong area....and thus posting a second time in here.

Sorry about that.