From 2ab1484cef1b2fbb6958ddb48a911fae620e9f71 Mon Sep 17 00:00:00 2001 From: filip Date: Sun, 30 Jun 2019 12:39:55 +0200 Subject: get rid of warnings --- en/downloads/get/index.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'en') diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php index cd067816c..ecb5f22cf 100644 --- a/en/downloads/get/index.php +++ b/en/downloads/get/index.php @@ -197,14 +197,15 @@ if (!$download) { header('Cache-Control: s-maxage=0, max-age=0, must-revalidate, no-cache'); $title = $product['name']; } -var_dump($product); -if(!isset($product['magnet'])) { +if(is_array($product) && !isset($product['magnet'])) { $product['magnet'] = null; } -if(!isset($product['obsolete'])) { +if(is_array($product) && !isset($product['obsolete'])) { $product['obsolete'] = null ; } -preg_match("/\D*(\d+.*)/", $product['size'], $product_size); +if(isset($product['size'])) { + preg_match("/\D*(\d+.*)/", $product['size'], $product_size); +} if ($debug) $js_redirect = null; @@ -231,7 +232,7 @@ if (!isset($_SERVER['APP_MODE']) || $_SERVER['APP_MODE'] == 'prod') {

'; _g('Warning !', null, 'h4'); _g('This file is obsolete, please download the latest version.', 'href="../" class="alert-link"', 'p'); -- cgit v1.2.1