1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Fixes #3909 - Fatal error on view download when entry is missing.

This commit is contained in:
Cameron
2019-08-22 14:51:35 -07:00
parent 2f5cfda4d4
commit 76bb75e802

View File

@@ -573,7 +573,7 @@ class download
$ns = e107::getRender();
/** @var download_shortcodes $sc */
$sc = $this->sc;
$sc->breadcrumb();
// @see: #3056 fixes fatal error in case $sc is empty (what happens, if no record was found)
$count = empty($sc) ? 0 : $sc->getVars();
@@ -583,6 +583,8 @@ class download
return $ns->tablerender(LAN_PLUGIN_DOWNLOAD_NAME, "<div style='text-align:center'>".LAN_NO_RECORDS_FOUND."</div>", 'download-view', true);
}
$sc->breadcrumb();
$DL_TEMPLATE = $this->template['start'].$this->template['item'].$this->template['end'];
$text = $tp->parseTemplate($this->templateHeader, TRUE, $sc);