Skip to content

Fix duplicate position parameter in log::getDelta call - #3120

Merged
Salvialf merged 1 commit into
jeedom:alphafrom
kwizer15:fix/jeeapi-log
Sep 21, 2025
Merged

Fix duplicate position parameter in log::getDelta call#3120
Salvialf merged 1 commit into
jeedom:alphafrom
kwizer15:fix/jeeapi-log

Conversation

@kwizer15

Copy link
Copy Markdown
Contributor

Description

Cette PR corrige un problème détecté par PHPStan dans jeeApi.php : l'appel à log::getDelta() passait le paramètre $params['position'] deux fois, ne correspondant pas à la signature de la méthode.

La signature de log::getDelta() attend 7 paramètres :

  • $_log
  • $_position
  • $_search
  • $_colored
  • $_numbered
  • $_numStart
  • $_max

Mais l'appel passait 8 paramètres avec $params['position'] en double (positions 2 et 4), ce qui décalait tous les paramètres suivants et causait un mauvais mapping des arguments.

Le correctif supprime le paramètre $params['position'] en double pour respecter la signature de la méthode.

Suggested changelog entry

Correction d'un paramètre en double dans l'appel à log::getDelta dans jeeApi.php

Related issues/external references

N/A

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
Salvialf merged commit 9fb4d9b into jeedom:alpha Sep 21, 2025
8 checks passed
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