Trying to setup a subscription-based site using the commerce_subscription module.
When I visit the cart after adding a product to it, I receive the following message:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in commerce_line_items_quantity() (line 1338 of sites/all/modules/commerce/modules/line_item/commerce_line_item.module).

Any clues?

Comments

rszrama’s picture

Status: Active » Closed (duplicate)
aristeides’s picture

I checked it before posting and I'm using the latest dev of every module involved. Line 1338 on the commerce_line_item.module file is already patched... has to be something else!

rszrama’s picture

Curious. Can you dump out the contents of the variables being passed to that function, then? Do something like:

  drupal_set_message('<pre>'. print_r(funct_get_args(), TRUE) .'</pre>');
hejeva’s picture

subscribe

mixedfeelings’s picture

subscribe

mixedfeelings’s picture

aristeides did you ever solve this?

aristeides’s picture

@mixedfeelings no, unfortunately I had to meet a very unpleasant deadline (just a week to design, build and troubleshoot everything) and an almost non-existent budget. At that time commerce didn't even have a stable version and I was facing many issues, some with the commerce core and some with the commerce_subscription module so I ended up using Drupal 6 with Ubercart just to save some time.
I'll attempt it again though, soon enough and this time I'll have some time to debug too. I don't even know if this issue still exists!

mixedfeelings’s picture

@aristeides It's definitely still an issue, but in a different spot for me:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in commerce_line_items_quantity() (line 1375 of /home/g-rad/public_html/issue/sites/all/modules/commerce/modules/line_item/commerce_line_item.module).

It looks like that is the same bit of code addressed in the above linked patch, but the patch has already been made....

I get this on the page after reviewing the checkout, the one that transports the user to the payment method (paypal in my case)

Anyone have any ideas?

rszrama’s picture

I'm going to need to get a debug backtrace or something to determine where the errant code is. afaik, it is coming from a contributed module.

mixedfeelings’s picture

interestingly, the error disappeared when i undid the patch - changing "types" to "type" in 1375.