Forums / General Questions / Deciphering MyDEBUG error

Deciphering MyDEBUG error

Started by jgold723 on 26 Mar 2012, 5:26 PM · Views: 1,399

Results 1 to 3 of 3
26 Mar 2012, 5:26 PM
#1
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Deciphering MyDEBUG error

I throw myself upon the mercy of the court.

I am trying to find the source of the error below - -it is being generated dozens of times a day -- it doesn't seem to affect the function of the cart, but I think it would be good to resolve it, since its spitting out myDEBUG files by the thousands

Here's the error from the MyDEBUG file:

[25-Mar-2012 17:24:01] PHP Warning: Missing argument 2 for currencies::display_price(), called in /nfs/c06/h05/mnt/92537/domains/quinceandco.com/html/store/includes/templates/quince/templates/tpl_checkout_confirmation_default.php on line 139 and defined in /nfs/c06/h05/mnt/92537/domains/quinceandco.com/html/store/includes/classes/currencies.php on line 112

Line 139 in tpl_checkout_confirmation_default.php is:

<?php echo $currencies->display_price($order->products[$i]['price'], $order->products[$i]['tax']); ?>

And line 112 in /classes/currencies.php is:

function display_price($products_price, $products_tax, $quantity = 1)

My question is -- what is the missing "argument 2" -- is it the tax value or the quantity value (I don't know if PHP numbers arguments 1,2,3 or 0,1,2)

Thank you for your help.

26 Mar 2012, 7:34 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Deciphering MyDEBUG error

Function arguments are numbered from 1. So it's talking about the tax amount.

Looks like you must have some addons that are mangling the normal way tax is handled.

http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Mar 2012, 8:07 PM
#3
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: Deciphering MyDEBUG error

That's what I thought, but I'm confused by this:

The line of code that's throwing an error is:

<?php echo $currencies->display_price($order->products[$i]['price'], $order->products[$i]['tax']); ?>

This line, by the way, is not part of the stock template -- it is a modification of some sort.

However, down slightly further, is a similar line (part of the stock template)

     ```
<?php echo $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']); ``` This does not generate an error, even though it is still calling for the same tax value as the line above (I think).