Closed (fixed)
Project:
Commerce Bulk Product Creation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2011 at 06:58 UTC
Updated:
12 Aug 2011 at 17:51 UTC
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
Comment #1
redna commentedHi 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;
}
Comment #2
sven.lauer commentedOr, even better: Rename "$value" to "$return", what it should have been in the first place.
Fixed. Thanks!
Comment #3
sven.lauer commented