From 009536d3f4d82f444b652ce9a5263d7a346254c1 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Thu, 5 Sep 2013 10:33:15 +0200 Subject: [PATCH] //small fix on version compare for install module --- classes/module/Module.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/module/Module.php b/classes/module/Module.php index b323204b6..3ffb10117 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -40,7 +40,7 @@ abstract class ModuleCore public $registered_version; /** @var array filled with known compliant PS versions */ - public $ps_versions_compliancy = array('min' => '1.4', 'max' => '1.6'); + public $ps_versions_compliancy = array(); /** @var array filled with modules needed for install */ public $dependencies = array(); @@ -138,6 +138,7 @@ abstract class ModuleCore */ public function __construct($name = null, Context $context = null) { + $this->ps_versions_compliancy = array('min' => '1.4', 'max' => _PS_VERSION_); // Load context and smarty $this->context = $context ? $context : Context::getContext(); if (is_object($this->context->smarty)) @@ -200,7 +201,7 @@ abstract class ModuleCore } // Check PS version compliancy - if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min']) < 0 || version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max']) >= 0) + if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min']) < 0 || version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max']) > 0) { $this->_errors[] = $this->l('The version of your module is not compliant with your PrestaShop version.'); return false;