LibreY- privacy respecting meta search engine |
git clone git://git.acid.vegas/LibreY.git |
Log | Files | Refs | Archive | README | LICENSE |
commit bfe699d5ad1341db10eb378ed454c8cdd19ee7b8
parent f8f30323eea53d12f25cd5f13c51cba481f9780c Author: davidovski <david@davidovski.xyz> Date: Wed, 30 Aug 2023 21:40:30 +0100 Do not throw error if duckduck go query fails Diffstat:
|
1 file changed, 3 insertions(+), 0 deletions(-) |
diff --git a/engines/text/duckduckgo.php b/engines/text/duckduckgo.php @@ -25,6 +25,9 @@ public function parse_results($response) { $results = array(); $xpath = get_xpath($response); + + if (!$xpath) + return $results; foreach($xpath->query("/html/body/div[1]/div[". count($xpath->query('/html/body/div[1]/div')) ."]/div/div/div/div") as $result) { |