From 9ba97c217dee9780fb2b94df752c05b50dab4bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Rivi=C3=A8re?= Date: Thu, 13 Dec 2018 21:42:18 +0100 Subject: [PATCH] fix check_issn hook (didn't work when the check digit=0) --- lodel/scripts/hookfunc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodel/scripts/hookfunc.php b/lodel/scripts/hookfunc.php index 0f1d17d8a..8b367a956 100644 --- a/lodel/scripts/hookfunc.php +++ b/lodel/scripts/hookfunc.php @@ -73,7 +73,7 @@ function check_issn(&$context, $field, &$errors) } $check %= 11; - $check = 11 - $check; + if ($check != 0) $check = 11 - $check; if ($check == $checksum || (($check == 10) && ($checksum == 'X'))) { $context['data'][$field] = wordwrap($value,4,'-', true);