Skip to content

Commit

Permalink
Merge pull request #9 from prhost/master
Browse files Browse the repository at this point in the history
fix - alguns providers estavam retornando not null porem com o endere…
  • Loading branch information
prhost authored Jun 15, 2023
2 parents 01a0e88 + ba2003c commit fde7931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CepGratis.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function resolve($cep)
do {
foreach ($this->providers as $provider) {
$address = $provider->getAddress($cep, $this->client, $this->options);
if (!is_null($address)) {
if (!is_null($address) && $address->state) {
break;
}
}
Expand Down

0 comments on commit fde7931

Please sign in to comment.