Created
December 30, 2015 09:36
-
-
Save torunar/ea2cd1afabb5fe7b0956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/Tygh/Shippings/Services/Ups.php b/app/Tygh/Shippings/Services/Ups.php | |
index 8e6bb56..435b28b 100644 | |
--- a/app/Tygh/Shippings/Services/Ups.php | |
+++ b/app/Tygh/Shippings/Services/Ups.php | |
@@ -188,13 +188,13 @@ class Ups implements IService | |
$origination = $this->_shipping_info['package_info']['origination']; | |
$location = $this->_shipping_info['package_info']['location']; | |
- $origination_postal = $origination['zipcode']; | |
- $origination_country = $origination['country']; | |
- $origination_state = $origination['state']; | |
+ $origination_postal = !empty($origination['zipcode']) ? $origination['zipcode'] : ''; | |
+ $origination_country = !empty($origination['country']) ? $origination['country'] : ''; | |
+ $origination_state = !empty($origination['state']) ? $origination['state'] : ''; | |
- $destination_postal = $location['zipcode']; | |
- $destination_country = $location['country']; | |
- $destination_state = $location['state']; | |
+ $destination_postal = !empty($location['zipcode']) ? $location['zipcode'] : ''; | |
+ $destination_country = !empty($location['country']) ? $location['country'] : ''; | |
+ $destination_state = !empty($location['state']) ? $location['state'] : ''; | |
$height = !empty($shipping_settings['height']) ? $shipping_settings['height'] : '0'; | |
$width = !empty($shipping_settings['width']) ? $shipping_settings['width'] : '0'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment