From 12dea728f8b4a86754717e6084070454febe383f Mon Sep 17 00:00:00 2001 From: cgzones Date: Sun, 3 Dec 2023 13:11:22 +0100 Subject: [PATCH] Ignore mbstring.func_overload in PHP 8 (#9227) The feature `mbstring.func_overload` is deprecated since PHP version 7.2 and removed since 8.0.0 (see https://www.php.net/manual/en/mbstring.overload.php). Skip trying to set it for PHP version 8, e.g. to avoid failures with the sloppy comparison hardening of Snuffleupagus (https://snuffleupagus.readthedocs.io/config.html#prevent-sloppy-comparison): --- program/lib/Roundcube/bootstrap.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php index bc45f80b75f..2260cff6356 100644 --- a/program/lib/Roundcube/bootstrap.php +++ b/program/lib/Roundcube/bootstrap.php @@ -28,12 +28,17 @@ $config = [ 'display_errors' => false, 'log_errors' => true, - // Some users are not using Installer, so we'll check some - // critical PHP settings here. Only these, which doesn't provide - // an error/warning in the logs later. See (#1486307). - 'mbstring.func_overload' => 0, ]; +// Some users are not using Installer, so we'll check some +// critical PHP settings here. Only these, which doesn't provide +// an error/warning in the logs later. See (#1486307). +if (PHP_MAJOR_VERSION < 8) { + $config += [ + 'mbstring.func_overload' => 0, + ]; +} + // check these additional ini settings if not called via CLI if (php_sapi_name() != 'cli') { $config += [