From 63a8e53b0866e29423ed82eafb36ea8bcc465e71 Mon Sep 17 00:00:00 2001 From: campbell-m <87438215+campbell-m@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:02:16 +0100 Subject: [PATCH] Add requirement for mbstring extension to be loaded for QR code to work --- web/Themes/default/header.inc | 6 ++++-- web/systemdefaults.inc.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/Themes/default/header.inc b/web/Themes/default/header.inc index af7012a463..3e6d20f0e7 100644 --- a/web/Themes/default/header.inc +++ b/web/Themes/default/header.inc @@ -471,10 +471,12 @@ function print_banner(?array $context, $simple=false, $omit_login=false) : void echo "\n"; // Add in a QR code for kiosk mode - // (The QR code library requires PHP 7.4 or greater) + // (The QR code library requires PHP 7.4 or greater and the mbstring extension) if (isset($context['kiosk']) && $kiosk_QR_code && - (version_compare(PHP_VERSION, '7.4') >= 0)) + (version_compare(PHP_VERSION, '7.4') >= 0) && + //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled + defined('MB_CASE_UPPER')) { $url = multisite(url_base() . "/index.php?$query"); echo '