Skip to content

Commit a5e774c

Browse files
authored
Merge pull request #20 from lbausch/patch-1
Avoid "Undefined index: query" warning
2 parents 9163d8e + c5c49cb commit a5e774c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/InvoiceNinja/Models/AbstractModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ protected static function sendRequest($url, $data = false, $type = 'GET', $raw =
154154
]);
155155

156156
$parsedUrl = parse_url($url);
157-
$separator = ($parsedUrl['query'] == NULL) ? '?' : '&';
157+
$separator = (!isset($parsedUrl['query']) || $parsedUrl['query'] == NULL) ? '?' : '&';
158158

159159
$url .= $separator . http_build_query($options);
160160

0 commit comments

Comments
 (0)