Skip to content

Commit f595f88

Browse files
danijelkjaimz22
authored andcommitted
Update ClientAdapter.php (#6)
$paramOut gets overwritten and thus gives invalid urls when using more than 1 parameter.
1 parent 8ef8345 commit f595f88

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ClientAdapters/ClientAdapter.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ private function buildRequestParameters($parameters)
5555

5656
$paramOut = '';
5757
foreach ($parameters as $key=>$value) {
58-
$paramOut = $key.'=';
58+
$paramOut .= $key.'=';
5959
if (is_array($value)){
6060
$paramOut .= join(',', $value);
6161
}else{
6262
$paramOut .= $value;
6363
}
64+
$paramOut .= '&';
6465
}
6566

6667
return $paramOut;
@@ -85,4 +86,4 @@ abstract public function getForecast($latitude, $longitude, \DateTime $time = NU
8586
* @return array
8687
*/
8788
abstract public function getHeaders();
88-
}
89+
}

0 commit comments

Comments
 (0)