blog param null version compare

This commit is contained in:
Fred Tempez 2022-10-05 09:29:35 +02:00
parent e22ad9998d
commit 0f069e0302
1 changed files with 2 additions and 5 deletions

View File

@ -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']);