Bonjour,
Suite à des erreurs détectées en http.error venant du plugin Philips Hue, j’ai proposé un PR sur le git du plugin, pour améliorer les checks des valeurs avant leur éventuelle utilisation (cela permet d’éviter ces erreurs dans les logs jeedom).
Le PR en question :
jeedom:beta ← TiTidom-RC:beta
opened 03:33PM - 29 Nov 25 UTC
Update $data['xxx'] checks to avoid php notice in http.error if item is not avai… lable
<!--
Please target the `beta` branch when submitting your pull request, unless your change **only** applies to Jeedom 4.x.
-->
## Description
J'ai régulièrement ces message d'erreur dans le plugin, dans les logs http.error :
0000|[Sat Nov 29 16:12:08.398705 2025] [php7:notice] [pid 623706:tid 623706] [client 127.0.0.1:44192] PHP Notice: Undefined index: motion in /var/www/html/plugins/philipsHue/core/class/philipsHue.class.php on line 876
0001|[Sat Nov 29 16:12:13.373246 2025] [php7:notice] [pid 710554:tid 710554] [client 127.0.0.1:50512] PHP Notice: Undefined index: light_level in /var/www/html/plugins/philipsHue/core/class/philipsHue.class.php on line 879
0002|[Sat Nov 29 16:12:22.490977 2025] [php7:notice] [pid 623706:tid 623706] [client 127.0.0.1:54758] PHP Notice: Undefined index: motion in /var/www/html/plugins/philipsHue/core/class/philipsHue.class.php on line 876
Jeedom : 4.5 (Stable)
Plugin PhilipsHue : Stable
### Suggested changelog entry
Ajout d'une vérification de l'existence des entrées dans le tableau $data avant d'utiliser la valeur associée
### Related issues/external references
Fixes #
Fixe les messages d'erreurs dans les logs http.error si le champ correspondant n'existe pas
## Types of changes
- [x] 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
- [x] I have checked there is no other PR open for the same change.
- [x] I have read the [Contribution Guidelines](https://doc.jeedom.com/fr_FR/contribute/).
- [x] I grant the project the right to include and distribute the code under the GNU.
- [ ] I have added tests to cover my changes.
- [x] I have verified that the code complies with the projects coding standards.
- [ ] [Required for new sniffs] I have added MD documentation for the sniff.
<!--
============================================================================================
Please make sure your pull request passes all continuous integration checks!
PRs which are failing their CI checks will likely be ignored by the maintainers.
PRs using atomic, descriptive commits are hugely appreciated as it will make
reviewing your changes easier for the maintainers.
============================================================================================
-->
Je laisse l’équipe Jeedom en charge de ce plugin regarder et si cela convient, le valider
Bonne journée,
TiTidom.
2 « J'aime »