diff options
author | filip <filip.komar@gmail.com> | 2019-06-30 12:39:55 +0200 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2019-06-30 12:39:55 +0200 |
commit | 2ab1484cef1b2fbb6958ddb48a911fae620e9f71 (patch) | |
tree | 20ed74f386b17445e3eb695065a0ee7339746810 | |
parent | 19566f35d5a470ef88400b7a50536e8f38a1694f (diff) | |
download | www-2ab1484cef1b2fbb6958ddb48a911fae620e9f71.tar www-2ab1484cef1b2fbb6958ddb48a911fae620e9f71.tar.gz www-2ab1484cef1b2fbb6958ddb48a911fae620e9f71.tar.bz2 www-2ab1484cef1b2fbb6958ddb48a911fae620e9f71.tar.xz www-2ab1484cef1b2fbb6958ddb48a911fae620e9f71.zip |
get rid of warnings
-rw-r--r-- | en/downloads/get/index.php | 11 |
1 files changed, 6 insertions, 5 deletions
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') { <div class="yui-g"><div class="para" style="padding-top: 2em;"> <p><?php -if($product['obsolete']) { +if(isset($product['obsolete'])) { echo '<div class="alert alert-danger" role="alert">'; _g('Warning !', null, 'h4'); _g('This file is obsolete, please <a %s>download</a> the latest version.', 'href="../" class="alert-link"', 'p'); |