[phplib] Cart bug??? From: Matt Friedman (matt <email protected>)
Date: 10/16/00

I've been trying to get the cart functionality working and I came across an odd situation.
What's supposed to happen when your cart is empty is the class should call the show_empty_cart() method. It does this based on whether or not $this->item (an array) is empty or not. If it is then your cart has no items in it.

Looking at the code that came with the distribution:

function show_all()
{
  if (!is_array($this->item) or ($this->item) == 0) {
  $this->show_empty_cart();
  return false;
}

Seems to me that the second "or" condition should be "count($this->item) == 0"

Anyway, I made this change and the class seems to call the method correctly now.

If this is incorrect or anyone wants to comment please do so, in case I've got this wrong. If it's right then hopefully it will help someone.
Matt.