8000 Don't pass null to adapter · geocoder-php/GeocoderLaravel@65a9373 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65a9373

Browse files
authored
Don't pass null to adapter
Hello, I had this issue with Guzzle. Guzzle expects an array to its constructor, but here we were passing null. This PR fixes that issue.
1 parent 2da0d71 commit 65a9373

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/ProviderAndDumperAggregator.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,13 @@ protected function getArguments(array $arguments, string $provider) : array
219219
}
220220

221221
$adapter = $this->getAdapterClass($provider);
222-
$reader = null;
223222

224223
if ($adapter) {
225224
if ($this->requiresReader($provider)) {
226-
$reader = config('geocoder.reader');
225+
array_unshift($arguments, new $adapter(config('geocoder.reader')));
226+
} else {
227+
array_unshift($arguments, new $adapter());
227228
}
228-
229-
array_unshift($arguments, new $adapter($reader));
230229
}
231230

232231
return $arguments;

0 commit comments

Comments
 (0)
0