aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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');