[interchange] Fix code which assumes we already have a hashref

David Christensen interchange-cvs at icdevgroup.org
Mon Nov 7 19:32:52 UTC 2016


commit 847ef1d1856cf121b4b09c9fcf6170f7310048bc
Author: David Christensen <david at endpoint.com>
Date:   Mon Nov 7 13:32:47 2016 -0600

    Fix code which assumes we already have a hashref

 lib/Vend/Data.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Data.pm b/lib/Vend/Data.pm
index 5313f72..edeac3c 100644
--- a/lib/Vend/Data.pm
+++ b/lib/Vend/Data.pm
@@ -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}



More information about the interchange-cvs mailing list