Commit 1ae98bc2 authored by Mohit Bansal's avatar Mohit Bansal Committed by Miguel Ferreira
Browse files

Issue #3217618 by mohit.bansal623: Undefined index & Invalid argument

parent 866754af
Loading
Loading
Loading
Loading
+31 −29
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ class EntityCopyReference {
      $clone->changed = time();

      if (array_key_exists($node->bundle(), $config['content_types'])) {
        if (isset($config['content_types'][$node->bundle()]['reference_fields']) && !empty($config['content_types'][$node->bundle()]['reference_fields'])) {
          foreach ($config['content_types'][$node->bundle()]['reference_fields'] as $field => $option) {

            if (!$node->hasField($field)) {
@@ -130,6 +131,7 @@ class EntityCopyReference {
            }
          }
        }
      }

    }