Active
Project:
UC Attribute Stock Filter
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jan 2011 at 18:26 UTC
Updated:
11 May 2011 at 20:23 UTC
Hi there. This module is EXACTLY what we need for our site, thanks for developing it.
After installing it, we are getting the following error (we are using php 5.3.3):
warning: Invalid argument supplied for foreach() in /var/www/landscapemafia.com/sites/all/modules/uc_attribute_stock_filter/uc_attribute_stock_filter.module on line 97.
These are code lines 96 through 102:
// Traverse through $form and unset any options that are not on the list
foreach ($form['attributes'] as $key => $attribute) {
if (is_numeric($key)) {
foreach ($form['attributes'][$key]['#options'] as $opt_key => $option) {
// Make sure it's numeric, don't kill the "Select..." option
if (is_numeric($opt_key) && !in_array($opt_key, $available)) {
unset($form['attributes'][$key]['#options'][$opt_key]);The module is still finding out of stock attributes, and keeping them from displaying...so thats good. Its just that the error messages are killing me.
Cheers
Comments
Comment #1
dirtysteak commentedAnyone else seen this? Thoughts?
I'd love to mess with php and submit a patch but I need some ideas, I'm all out...
Comment #2
dirtysteak commentedbump....this is really becoming a hassle. My log is virtually unusable.
Comment #3
czeky commentedsame here..
Comment #4
max36 commentedI found the patch below which fixed this issue for me:
http://drupal.org/files/issues/uc_attribute_stock_filter.module_2.patch
Comment #5
max36 commentedI found the patch below which fixed this issue for me:
http://drupal.org/files/issues/uc_attribute_stock_filter.module_2.patch
Comment #6
mcdoolz commentedHas this been committed? I'm using the latest dev version and seeing this error.