Commit 91f17a8f authored by Stanciu Alex's avatar Stanciu Alex Committed by Joao Ventura
Browse files

Issue #3318668 by jcnventura, alex.stanciu: Skip empty changes

parent 0670fb80
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -98,6 +98,9 @@ class EntityLogService implements EntityLogServiceInterface {
        if ($new_value != $old_value) {
          $old_value = implode(',', $old_value);
          $new_value = implode(',', $new_value);
          if ($old_value === $new_value || (empty($old_value) && empty($new_value))) {
            continue;
          }
          if ($this->configFactory->get('entity_log.configuration')->get('log_in_logger')) {
            $this->logger->info('Entity type: @type | Bundle: @bundle | Field: @field_name | Old: @old | New: @new', [
                '@type' => $entity->getEntityTypeId(),