From 9b15856cc24cf9af45af6625f8d325351038dceb Mon Sep 17 00:00:00 2001
From: Rosie Le Faive <lefaive@gmail.com>
Date: Tue, 13 Dec 2022 19:22:12 -0400
Subject: [PATCH] Use new syntax for filehash.

---
 islandora.module | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/islandora.module b/islandora.module
index 6f7a15d2..69176714 100644
--- a/islandora.module
+++ b/islandora.module
@@ -183,7 +183,8 @@ function islandora_file_insert(FileInterface $file) {
  */
 function islandora_file_update(FileInterface $file) {
   // Exit early if unchanged.
-  if ($file->filehash != NULL && $file->original->filehash != NULL && $file->filehash['sha1'] == $file->original->filehash['sha1']) {
+  if ($file->hasField('sha1') && $file->original->hasField('sha1')
+    && $file->sha1->getString() == $file->original->sha1->getString()) {
     return;
   }