Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Commit 1cea148

Browse files
committed
Fixed a bug where searches with spaces were not being processed correctly because the search query string was being constructed naively.
1 parent 2e14839 commit 1cea148

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Server/Library/SectionAbstract.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,15 @@ protected function buildEndpoint($endpoint)
276276
*/
277277
protected function buildSearchEndpoint($type, $query)
278278
{
279+
$parameters = array(
280+
'type' => $type,
281+
'query' => trim($query)
282+
);
283+
279284
$endpoint = sprintf(
280-
'%s?type=%d&query=%s',
285+
'%s?%s',
281286
self::ENDPOINT_SEARCH,
282-
$type,
283-
trim($query)
287+
http_build_query($parameters)
284288
);
285289

286290
return $this->buildEndpoint($endpoint);

0 commit comments

Comments
 (0)