Skip to content

Commit

Permalink
Check if object is queued for update before removing it
Browse files Browse the repository at this point in the history
  • Loading branch information
dtakken committed Jun 12, 2024
1 parent 1f22e86 commit eafddcc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/classes/SyncManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ public function remove_from_queue( $object_id ) {
return false;
}

if ( ! isset( $this->sync_queue[ $object_id ] ) ) {
return false;
}

$current_blog_id = get_current_blog_id();
if ( ! isset( $this->sync_queue[ $current_blog_id ] ) ) {
$this->sync_queue[ $current_blog_id ] = [];
Expand Down

0 comments on commit eafddcc

Please sign in to comment.