Cdiscount / API-MarketPlace-SDK-PHP

15 stars 42 forks source link

fix of Notice: Undefined index: Address1 #34

Open bnowak opened 6 years ago

bnowak commented 6 years ago

Occurrence of BusinessAddress (and ShippingAddress) in response of command GetOrderList is optional. So according to documentation sometimes response can look like:

[...]
    <Order>
        <ArchiveParcelList>false</ArchiveParcelList>
        <BillingAddress i:nil="true"/>
        <Corporation i:nil="true"/>
        <CreationDate>2017-11-07T21:22:23.98</CreationDate>
[...]
        <OrderState i:nil="true"/>
    </Order>
[...]

In this case i getting notice: Undefined index: Address1 Parsing this response doesn't match the documentation.

gcmikolaj commented 6 years ago

+1

gralec99 commented 6 years ago

Please approve

rmalodobry commented 6 years ago

Taking for consideration that documentations explicits says that this field is voluntary, this if checkout of additional is required to get ride off unnecessary notices.