I am receiving the following warning:

"warning: Invalid argument supplied for foreach() in /Users/Shared/WebServer/dev8/modules/ecommerce/cart/cart.module on line 674"

I have one item in my shopping cart. This is a development system so all warning flags are enabled.

The lines are:

674        foreach ($p as $key => $value) {
675          $cart->$key = $value;
676        }

By wrapping this foreach loop in an "if ($p) { ... }" clause, I can make the error go away. But I am new to this module -- is this fix just masking a real problem?

CommentFileSizeAuthor
ecommerce-cart-foreach.patch258 bytescoloma

Comments

neclimdul’s picture

Component: cart.module » -- other --
Status: Needs review » Closed (fixed)