diff --git a/src/Entity/BrokenLink.php b/src/Entity/BrokenLink.php
index 16a7d0e..eb100ae 100644
--- a/src/Entity/BrokenLink.php
+++ b/src/Entity/BrokenLink.php
@@ -83,7 +83,8 @@ class BrokenLink extends ContentEntityBase implements ContentEntityInterface {
    */
   public function loadByLink($link) {
     $page_access_storage = \Drupal::entityManager()->getStorage('broken_link');
-    return array_shift($page_access_storage->loadByProperties(['link' => $link]));
+    $link_entity = $page_access_storage->loadByProperties(['link' => $link]);
+    return array_shift($link_entity);
   }
 
   /**
