aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2019-06-30 12:39:55 +0200
committerfilip <filip.komar@gmail.com>2019-06-30 12:39:55 +0200
commit2ab1484cef1b2fbb6958ddb48a911fae620e9f71 (patch)
tree20ed74f386b17445e3eb695065a0ee7339746810
parent19566f35d5a470ef88400b7a50536e8f38a1694f (diff)
get rid of warnings
-rw-r--r--en/downloads/get/index.php11
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');