Commit 5fddbaf9 authored by Sven Decabooter's avatar Sven Decabooter
Browse files

Issue #3279839: in_array error upon module installation

parent 0149521c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -63,12 +63,14 @@ class EntityTypeInfo implements ContainerInjectionInterface {
   */
  public function entityTypeAlter(array &$entity_types) {
    $enabled_entity_types = $this->entityLoggerSettings->get('enabled_entity_types');
    if (is_array($enabled_entity_types)) {
      foreach ($entity_types as $entity_type_id => $entity_type) {
        if (in_array($entity_type_id, $enabled_entity_types)) {
          $entity_type->setLinkTemplate('entity-logger', "/entity_logger/$entity_type_id/{{$entity_type_id}}");
        }
      }
    }
  }

  /**
   * Add entity operation on entities that supports it.