From 64b522a8a896d5b32e216fc66444aa947b7cbd25 Mon Sep 17 00:00:00 2001
From: Jason Hildebrand <jason@peaceworks.ca>
Date: Thu, 1 Dec 2022 16:13:40 -0600
Subject: [PATCH] Fix warning by checking whether key is set. (#909)

* Fix warning by checking whether key is set.

* Adjust plugin check in integer-weight views hook.
---
 islandora.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/islandora.module b/islandora.module
index 5b5446d1..9814820e 100644
--- a/islandora.module
+++ b/islandora.module
@@ -515,7 +515,7 @@ function islandora_preprocess_views_view_table(&$variables) {
 
   // Check for a weight selector field.
   foreach ($variables['view']->field as $field_key => $field) {
-    if ($field->options['plugin_id'] == 'integer_weight_selector') {
+    if ($field->getPluginId() == 'integer_weight_selector') {
 
       // Check if the weight selector is on the first column.
       $is_first_column = array_search($field_key, array_keys($variables['view']->field)) > 0 ? FALSE : TRUE;