Skip to content

Conversation

@Phpvarious
Copy link
Contributor

Description

Lors d'une version majeure, celle-ci est déclaré comme ceci :
https://github.com/jeedom/core/blob/91dd8f73abf2809e4cb0e0abf2986802054535e4/core/config/version
soit 4.5 (au lieu de 4.5.0), et lors d'un update (ex: 4.5.1) cela génère des "Notices" dans le log update :

  • PHP Notice: Undefined offset: 2 in /var/www/html/install/update.php on line 399
  • PHP Notice: Undefined offset: 2 in /var/www/html/install/update.php on line 400

Je propose donc de forcer le .0 lors qu'il n'est pas présent.

Related issues/external references

Fixes #

Types of changes

  • Bug fix (non-breaking change which fixes)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

@Salvialf
Copy link
Contributor

Salvialf commented Dec 18, 2025

Hello @Phpvarious,

A patch was planned for 4.5.2 but you're right it wasn't suitable.

So fixed again 4.5.2 : 1b78dc1

Thank you

@Phpvarious
Copy link
Contributor Author

Hello,

Oups, Désolé j'avais pas vu qu'il y avait une branch 4.5.2,

Par contre, la proposition dans ton commit ne fonctionne pas si par exemple $_version = 4.5, le retour sera 4.6.0 si je me trompe pas.

@Salvialf
Copy link
Contributor

C'est ce dont je me suis rendu compte avec ta PR ! Voyant que $version[2] était défini dans le else j'ai été ultra pragmatique pour corriger mais ça n'allait pas d'où le fix avec ta proposition.

@Phpvarious Phpvarious closed this Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants