Skip to content

Commit d03fd1b

Browse files
committed
put empty string check back since we have updated the function param to accept null
1 parent 3c1cb54 commit d03fd1b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Common/Query/GeocodeQuery.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
namespace Geocoder\Query;
1414

15+
use Geocoder\Exception\InvalidArgument;
1516
use Geocoder\Geocoder;
1617
use Geocoder\Model\Bounds;
1718

@@ -49,6 +50,10 @@ final class GeocodeQuery implements Query
4950

5051
private function __construct(?string $text)
5152
{
53+
if ('' === $text) {
54+
throw new InvalidArgument('Geocode query cannot be empty');
55+
}
56+
5257
$this->text = $text;
5358
}
5459

0 commit comments

Comments
 (0)