Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cmd.class.php #2981

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Update cmd.class.php #2981

merged 1 commit into from
Nov 21, 2024

Conversation

Phpvarious
Copy link
Contributor

https://community.jeedom.com/t/probleme-en-nettoyage-de-bdd/134068

Description

PHP Fatal error: Uncaught Error: Call to a member function setStatus() on bool in /var/www/html/core/class/cmd.class.php:1137

Suggested changelog entry

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

'warning' => 0,
'danger' => 0,
));
if (is_object($eqLogic)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& method_exists($eqLogic, 'setStatus')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonjour, Désolé mais je ne comprend pas la proposition.
Hello, Sorry but I don't understand the proposal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tu vérifie que ta variable est un objet. Si c'est le cas tu appels la methode set Status, mais rien n'indique ici que cette méthode existe dans ton objet. Ma proposition permet juste de faire cette vérification.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La verification doit suffire dans quasiment tous les cas. Il est peut probable que l’objet n’est pas la méthode en question.

@zoic21 zoic21 merged commit 31663dd into jeedom:alpha Nov 21, 2024
4 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.

3 participants