Skip to content
Snippets Groups Projects
Commit 0dfd3fc4 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

merge searchengine settings the other way around

parent 5d47205d
No related branches found
No related tags found
1 merge request!2229Development
...@@ -177,7 +177,7 @@ class SearchengineConfiguration ...@@ -177,7 +177,7 @@ class SearchengineConfiguration
if ($this->requestHeader === null) { if ($this->requestHeader === null) {
$this->requestHeader = new \stdClass; $this->requestHeader = new \stdClass;
} }
$this->requestHeader = (object) array_merge((array) $this->requestHeader, (array) $requestHeader); $this->requestHeader = (object) array_merge((array) $requestHeader, (array) $this->requestHeader);
} }
public function addQueryParameters(object|array $queryParameters) public function addQueryParameters(object|array $queryParameters)
...@@ -188,7 +188,7 @@ class SearchengineConfiguration ...@@ -188,7 +188,7 @@ class SearchengineConfiguration
if ($this->getParameter === null) { if ($this->getParameter === null) {
$this->getParameter = new \stdClass; $this->getParameter = new \stdClass;
} }
$this->getParameter = (object) array_merge((array) $this->getParameter, (array) $queryParameters); $this->getParameter = (object) array_merge((array) $queryParameters, (array) $this->getParameter);
} }
public function applyQuery(string $query) public function applyQuery(string $query)
......
...@@ -145,7 +145,7 @@ class BraveNews extends Searchengine ...@@ -145,7 +145,7 @@ class BraveNews extends Searchengine
try { try {
$results = json_decode($result); $results = json_decode($result);
if (!$results->query->more_results_available) { if (sizeof($results->results) === 0) {
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment