Hi, I see the following errors on log entries of my production environment:
in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in .../sites/all/modules/ubercart/uc_store/uc_store.module on line 2093.

An empty order made it to checkout! Cart order ID:

It occours when the user tries to complete the order, but I cannot replicate it on local development environment (I'll do a full backup asap).

CommentFileSizeAuthor
#2 1318452-uc_cart.patch533 bytesmandreato

Comments

mandreato’s picture

I cannot reproduce it locally after full backup, probably because I'm on a Windows box with IE/Chrome/FF, while the problem in production comes from a user using Safari on Macintosh.

mandreato’s picture

Status: Active » Needs review
StatusFileSize
new533 bytes

I finally replicated the error also on the development environment by using Chrome.
It seems that line 366 of uc_cart.pages.inc should be corrected to:

  if ($_SESSION['do_review'] !== TRUE && !uc_referer_check(array('cart/checkout'))) {

because uc_referer_check expects an array.

Attached a patch (flush the cache after code fix).
Hope This Helps.

longwave’s picture

Status: Needs review » Fixed

Committed, thanks.

jamesoakley’s picture

See #1329266: Error when reviewing checkout: Array expected but string given.

I've applied this patch to my site. I managed to patch it (using SSH), but should it concern us that SimpleTest spat it out?

tr’s picture

The patch was properly rejected by the testbot because of its DOS-style line endings. Those don't affect the functioning of the patch, they just violate the Drupal coding standards.

However, longwave kindly fixed up this patch before it was committed. Don't count on that happening for anything other than a trivial patch like this... In general you should work to get the testbot to approve your patch before you expect others to review it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.