From 09cedb5a5ee13c52118a8e306e4a396d1034c384 Mon Sep 17 00:00:00 2001 From: Martin Neubauer Date: Fri, 12 Mar 2021 13:55:39 +0100 Subject: [PATCH] ISBN might start with 979 these days --- htdocs/core/lib/barcode.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index 98776e8a63d..52e4d289c3a 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -237,7 +237,7 @@ function barcode_encode_ean($ean, $encoding = "EAN-13") $ean = "978".$ean; } } - if (preg_match("/^978/", $ean)) { + if (preg_match("/^97[89]/", $ean)) { $encoding = "ISBN"; } if (strlen($ean) < 12 || strlen($ean) > 13) {