Created
November 3, 2023 22:24
-
-
Save slattery/2af576d68141d57021b98d78685b8ac6 to your computer and use it in GitHub Desktop.
bibcite-ris-encoder-nondigitfix-20231103-01.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/bibcite_ris/src/Encoder/RISEncoder.php b/modules/bibcite_ris/src/Encoder/RISEncoder.php | |
index 78cc087..f5af92d 100644 | |
--- a/modules/bibcite_ris/src/Encoder/RISEncoder.php | |
+++ b/modules/bibcite_ris/src/Encoder/RISEncoder.php | |
@@ -60,7 +60,7 @@ class RISEncoder implements EncoderInterface, DecoderInterface { | |
$record['EP'] = (array) $record['EP']; | |
} | |
$max_sp = array_key_exists('SP', $record) ? max($record['SP']) : NULL; | |
- $max_ep = array_key_exists('EP', $record) ? max($record['EP']) : 0; | |
+ $max_ep = array_key_exists('EP', $record) && is_int($record['EP']) ? max($record['EP']) : 0; | |
if ($max_sp && $max_sp > $max_ep) { | |
$pages_string .= $max_sp . '+'; | |
array_splice($record['SP'], array_search($max_sp, $record['SP']), 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment