Skip to content

Commit 494f0b6

Browse files
authored
Merge pull request #273 from BigMichi1/patch-1
replace empty() check in listener
2 parents f6a4796 + ca1bf71 commit 494f0b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doctrine/ORM/GeocoderListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private function geocodeEntity($entity)
100100

101101
$results = $this->geocoder->geocodeQuery(GeocodeQuery::create($address));
102102

103-
if (!empty($results)) {
103+
if (!$results->isEmpty()) {
104104
$result = $results->first();
105105
$metadata->latitudeProperty->setValue($entity, $result->getCoordinates()->getLatitude());
106106
$metadata->longitudeProperty->setValue($entity, $result->getCoordinates()->getLongitude());

0 commit comments

Comments
 (0)