Author: jacopoc
Date: Sat Dec 23 23:05:11 2006
New Revision: 489992

URL: http://svn.apache.org/viewvc?view=rev&rev=489992
Log:
Added checks to avoid NPE: this should fix the bug reported in anonymous 
checkout by Rohit Sureka in OFBIZ-561.


Modified:
    
incubator/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

Modified: 
incubator/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?view=diff&rev=489992&r1=489991&r2=489992
==============================================================================
--- 
incubator/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
 (original)
+++ 
incubator/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
 Sat Dec 23 23:05:11 2006
@@ -804,9 +804,11 @@
            </call-object-method>
 
            <set field="maySplit" from-field="parameters.may_split" 
type="Boolean"/>
-           <call-object-method obj-field-name="cart" method-name="setMaySplit">
-               <field field-name="maySplit" type="Boolean"/>
-           </call-object-method>
+           <if-not-empty field-name="maySplit">
+               <call-object-method obj-field-name="cart" 
method-name="setMaySplit">
+                   <field field-name="maySplit" type="Boolean"/>
+               </call-object-method>
+           </if-not-empty>
 
            <set field="shippingInstruction" 
from-field="parameters.shipping_instructions" type="String"/>
            <if-not-empty field-name="shippingInstruction">
@@ -818,9 +820,11 @@
            <set field="correspondingPoId" 
from-field="parameters.corresponding_po_id"/>
 
            <set field="isGift" from-field="parameters.is_gift" type="Boolean"/>
-           <call-object-method obj-field-name="cart" method-name="setIsGift">
-               <field field-name="isGift" type="Boolean"/>
-           </call-object-method>
+           <if-not-empty field-name="isGift">
+               <call-object-method obj-field-name="cart" 
method-name="setIsGift">
+                   <field field-name="isGift" type="Boolean"/>
+               </call-object-method>
+           </if-not-empty>
 
            <set field="giftMessage" from-field="parameters.gift_message" 
type="String"/>
            <if-not-empty field-name="giftMessage">


Reply via email to