core/modules/editor/editor.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index f17acf9..3302f16 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -419,13 +419,13 @@ function editor_entity_update(EntityInterface $entity) { // Detect file usages that should be incremented. foreach ($uuids_by_field as $field => $uuids) { - $added_files = array_diff($uuids_by_field[$field], $original_uuids_by_field); + $added_files = array_diff($uuids_by_field[$field], $original_uuids_by_field[$field]); _editor_record_file_usage($added_files, $entity); } // Detect file usages that should be decremented. foreach ($original_uuids_by_field as $field => $uuids) { - $removed_files = array_diff($original_uuids_by_field[$field], $uuids_by_field); + $removed_files = array_diff($original_uuids_by_field[$field], $uuids_by_field[$field]); _editor_delete_file_usage($removed_files, $entity, 1); } }