diff --git a/app/Models/CustomerInfo.php b/app/Models/CustomerInfo.php index e657fc6..829b680 100644 --- a/app/Models/CustomerInfo.php +++ b/app/Models/CustomerInfo.php @@ -44,7 +44,7 @@ class CustomerInfo extends Model if (ctype_digit($customerInfo->country)) { try { $customerInfo->newcountry = Country::make((int)$customerInfo->country); - } catch (\TypeError $e) { + } catch (\BadMethodCallException $e) { // TODO change this when country column is updated // Set afghanistan as default country for now $customerInfo->newcountry = Country::afghanistan(); @@ -68,7 +68,7 @@ class CustomerInfo extends Model if (ctype_digit($customerInfo->country)) { try { $customerInfo->newcountry = Country::make((int)$customerInfo->country); - } catch (\TypeError $e) { + } catch (\BadMethodCallException $e) { // TODO change this when country column is updated // Set afghanistan as default country for now $customerInfo->newcountry = Country::afghanistan();