Skip to content

Commit

Permalink
Fix code which assumes we already have a hashref
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christensen committed Nov 7, 2016
1 parent 912ce6f commit 847ef1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Vend/Data.pm
Expand Up @@ -1643,10 +1643,11 @@ sub item_price {

#::logDebug("item_price initial call: " . (ref $item ? $item->{code} : $item));

$item = { 'code' => $item } unless ref $item;

return $item->{mv_cache_price}
if ! $quantity and ref($item) and defined $item->{mv_cache_price};

$item = { 'code' => $item } unless ref $item;
$item->{quantity} = 1 if ! defined $item->{quantity};

if( ! $item->{mv_ib}
Expand Down

0 comments on commit 847ef1d

Please sign in to comment.