Skip to content

Commit 2827473

Browse files
committed
Improve feedback on bad response
1 parent 8db65bf commit 2827473

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/BigBlueButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ private function sendRequest(string $url, string $payload = '', string $contentT
487487
}
488488

489489
if ($httpCode < 200 || $httpCode >= 300) {
490-
throw new BadResponseException('Bad response, HTTP code: ' . $httpCode);
490+
throw new BadResponseException('Bad response, HTTP code: ' . $httpCode . ', url: ' . $url);
491491
}
492492

493493
// CLOSE AND UNSET

src/Parameters/BaseParameters.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ abstract public function getHTTPQuery();
3737
*/
3838
protected function buildHTTPQuery($array)
3939
{
40+
// Potential replacement by: http_build_query($queries, '', '&', \PHP_QUERY_RFC3986);
41+
4042
return str_replace(['%20', '!', "'", '(', ')', '*'], ['+', '%21', '%27', '%28', '%29', '%2A'], http_build_query(array_filter($array), '', '&', \PHP_QUERY_RFC3986));
4143
}
4244
}

0 commit comments

Comments
 (0)