From 34c53532b5b67a4c6cd3160d3e31bf54010290c7 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 26 Jan 2023 18:43:45 -0600 Subject: [PATCH] Revert "Fix entity-state polling/discovery (#14793)" (#14811) This reverts commit ebbb7cbdcfef2ef70d315b588a494fc56b047f27. --- includes/discovery/entity-state.inc.php | 2 +- includes/polling/entity-state.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/discovery/entity-state.inc.php b/includes/discovery/entity-state.inc.php index 5cc38d7bb6..2bfaad3e51 100644 --- a/includes/discovery/entity-state.inc.php +++ b/includes/discovery/entity-state.inc.php @@ -56,7 +56,7 @@ if (! empty($entPhysical)) { if (isset($db_states[$id])) { // update the db $db_state = $db_states[$id]; - $update = array_diff_assoc($state, $db_state); + $update = array_diff($state, $db_state); if (! empty($update)) { if (array_key_exists('entStateLastChanged', $update) && is_null($update['entStateLastChanged'])) { diff --git a/includes/polling/entity-state.inc.php b/includes/polling/entity-state.inc.php index 61b0e06e37..fc446d3579 100644 --- a/includes/polling/entity-state.inc.php +++ b/includes/polling/entity-state.inc.php @@ -64,7 +64,7 @@ if (! empty($entityStatesIndexes)) { ->format('Y-m-d H:i:s'); // check if anything has changed - $update = array_diff_assoc( + $update = array_diff( $new_states, dbFetchRow( 'SELECT * FROM entityState WHERE entity_state_id=?',