From 0f069e0302c3c1448bb73ab80742b127cc06280d Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 5 Oct 2022 09:29:35 +0200 Subject: [PATCH] blog param null version compare --- module/blog/blog.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index 08a51069..9ea92df5 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -124,12 +124,9 @@ class blog extends common { * Appelée par les fonctions index et config */ private function update() { - // Eviter valeur null - if (is_null($this->getData(['module', $this->getUrl(0), 'config', 'versionData'])) ){ - return; - } // Initialisation - if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '0.0', '<') ) { + if (is_null($this->getData(['module', $this->getUrl(0), 'config', 'versionData'])) || + version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '0.0', '<') ) { $this->setData(['module', $this->getUrl(0), 'config', 'feeds', true]); $this->setData(['module', $this->getUrl(0), 'config', 'feedsLabel', 'Flux RSS']); $this->setData(['module', $this->getUrl(0), 'config', 'versionData','4.0']);