From 62dbb2da6661ec0b39d8037cea5bcc29d1a415fc Mon Sep 17 00:00:00 2001
From: Dominik Pfennig <dominik@suma-ev.de>
Date: Wed, 31 Aug 2016 07:44:32 +0200
Subject: [PATCH] =?UTF-8?q?Wenn=20keine=20Suchmaschine=20zum=20Weitersuche?=
 =?UTF-8?q?n=20eingestellt=20war,=20ist=20das=20Programm=20abgest=C3=BCrzt?=
 =?UTF-8?q?.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/MetaGer.php             | 2 +-
 app/Models/Searchengine.php | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/app/MetaGer.php b/app/MetaGer.php
index 2c8b4f9fe..8a4c476ae 100644
--- a/app/MetaGer.php
+++ b/app/MetaGer.php
@@ -1065,7 +1065,7 @@ class MetaGer
 
     public function nextSearchLink()
     {
-        if (isset($this->next) && count($this->next['engines']) > 0) {
+        if (isset($this->next) && isset($this->next['engines']) && count($this->next['engines']) > 0) {
             $requestData         = $this->request->except(['page', 'out']);
             $requestData['next'] = md5(serialize($this->next));
             $link                = action('MetaGerSearch@search', $requestData);
diff --git a/app/Models/Searchengine.php b/app/Models/Searchengine.php
index c93d8ecbd..934118dd4 100644
--- a/app/Models/Searchengine.php
+++ b/app/Models/Searchengine.php
@@ -68,17 +68,20 @@ abstract class Searchengine
         } else {
             $q = $metager->getQ();
         }
-        $this->getString  = $this->generateGetString($q, $metager->getUrl(), $metager->getLanguage(), $metager->getCategory());
+        $this->getString = $this->generateGetString($q, $metager->getUrl(), $metager->getLanguage(), $metager->getCategory());
+        die($this->getString);
         $this->hash       = md5($this->host . $this->getString . $this->port . $this->name);
         $this->resultHash = $metager->getHashCode();
     }
 
     abstract public function loadResults($result);
 
-    public function getLast(MetaGer $metager, $result){
+    public function getLast(MetaGer $metager, $result)
+    {
 
     }
-    public function getNext(MetaGer $metager, $result){
+    public function getNext(MetaGer $metager, $result)
+    {
 
     }
 
-- 
GitLab