From 7cb8620cb5da297b18d0a31b37bd71262d62ad9a Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 21 Oct 2021 20:19:45 +0200 Subject: [PATCH] Disable unidecode lib loading if mb_ord() not available (PHP>=7.2 required) --- src/includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/includes/functions.php b/src/includes/functions.php index 11b8f632..c0a7d11a 100644 --- a/src/includes/functions.php +++ b/src/includes/functions.php @@ -536,7 +536,8 @@ function ___($msg) { } // Try to load unidecode library -if (!function_exists('unidecode')) { +// Note: unidecode lib use mb_ord function only available since PHP 7.2. +if (!function_exists('unidecode') && function_exists('mb_ord')) { if (file_exists(LS_LIB_DIR."/unidecode/unidecode.php")) @include(LS_LIB_DIR."/unidecode/unidecode.php"); if (!function_exists('unidecode') && stream_resolve_include_path("unidecode/unidecode.php"))