From 2b2737ae41367037082db2f5a15cdd378f5d77b9 Mon Sep 17 00:00:00 2001 From: Achim Ennenbach Date: Thu, 12 Jul 2018 12:48:01 +0200 Subject: [PATCH] Fixes #3056 Fixes the fatal error in case no records were found --- e107_plugins/download/handlers/download_class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index cbe16f6e7..02fabb3e8 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -563,7 +563,8 @@ class download $ns = e107::getRender(); $sc = $this->sc; - $count = $sc->getVars(); + // @see: #3056 fixes fatal error in case $sc is empty (what happens, if no record was found) + $count = empty($sc) ? 0 : $sc->getVars(); if(empty($count)) {