Skip to content

Commit

Permalink
Fix get City
Browse files Browse the repository at this point in the history
  • Loading branch information
vxdiv committed Oct 9, 2019
1 parent 957a5ac commit 9bf7ce2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Delivery/NovaPoshtaApi2.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,11 @@ public function getCity($cityName, $areaName = '')
: $cities['data'][0];
}
// Error
(!$data) and $error = 'City was not found';
$error = null;
if (empty($data)) {
$error = 'City was not found';
}

// Return data in same format like NovaPoshta API
return $this->prepare(
array(
Expand Down

0 comments on commit 9bf7ce2

Please sign in to comment.