Hi,

testing this module I've found the next problem:

When I tryed to create a bulk product the next message was displayed and there was no token in the token area:

Notice: Undefined variable: return in _commerce_bpc_get_value() (line 462 of commerce_bpc.module)

Looking at the code, in commerce_bpc.module line 462 I've noticed that the return value was the following:

return $return;

At this point there is no $return variable defined so I changed this line to:

return $value;

Now it works fine and I've been able to create a bulk product.

Hope this helps.

Comments

redna’s picture

Hi again,

having a better look to the code, I found that the following change would be better:

--- commerce_bpc.module 2011-07-23 08:35:36.000000000 +0200
+++ /var/tmp/commerce_bpc.module 2011-07-29 09:04:29.000000000 +0200
@@ -459,5 +459,8 @@
if (!$key_exists) {
$return = $default;
}
+ else{
+ $return = $value;
+ }
return $return;
}

sven.lauer’s picture

Or, even better: Rename "$value" to "$return", what it should have been in the first place.

Fixed. Thanks!

sven.lauer’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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