Skip to content

Commit

Permalink
Ignore mbstring.func_overload in PHP 8 (#9227)
Browse files Browse the repository at this point in the history
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):
  • Loading branch information
cgzones authored Dec 3, 2023
1 parent 17eec91 commit 12dea72
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions program/lib/Roundcube/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 += [
Expand Down

0 comments on commit 12dea72

Please sign in to comment.