fix in uc_attribute_nodeapi

Posts: 65
Joined: 01/23/2008
Bug Finder

Hi,

I was experiencing these errors executing the cron:

* warning: Invalid argument supplied for foreach() in /webs/amatusalud.es/sites/amatusalud.local.pc/modules/ubercart/uc_attribute/uc_attribute.module on line 191.

And i am not the only one Eye-wink (http://www.ubercart.org/forum/support/2665/random_errors_driving_me_nuts...)

So, i dived into code, and i found this misspell in the uc_attibute.module, in uc_attribute_nodeapi function
Here

foreach (<strong>$atrribute</strong>->options as $option){
            $output .= $option->name .' ';
          }

Should be

foreach (<strong>$attribute</strong>->options as $option){
            $output .= $option->name .' ';
          }

I'll be around for some weeks, as i am developing a drupal-ubercart store, so i expect to contribute a little more than this! Smiling

Regards
Pedro

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Great find. Fixed and committed to core; bug finder badge committed to you. Evil