Skip to content

Commit 74b873e

Browse files
committed
Merge branch 'master' of github.com:imgix/imgix-php
2 parents 275bf75 + 93aaa0e commit 74b873e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Imgix/UrlHelper.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ public function deleteParamter($key) {
3434
}
3535

3636
public function getURL() {
37-
ksort($this->params);
3837
$queryPairs = array();
39-
foreach ($this->params as $k => $v) {
40-
$queryPairs[] = $k . "=" . self::encodeURIComponent($v);
38+
39+
if ($this->params) {
40+
ksort($this->params);
41+
42+
foreach ($this->params as $k => $v) {
43+
$queryPairs[] = $k . "=" . self::encodeURIComponent($v);
44+
}
4145
}
4246

4347
$query = join("&", $queryPairs);

0 commit comments

Comments
 (0)