External Libraries: Backport a commit from sodium_compat trunk to fix a PHP 8 error.

This addresses an "Undefined constant `MB_OVERLOAD_STRING`" fatal error in the `ParagonIE_Sodium_Core_Util::isMbStringOverride()` method.

In PHP 8, the `MB_OVERLOAD_STRING` constant has been removed, along with the `mbstring` function overloading feature.

Fixes #51399.

git-svn-id: https://develop.svn.wordpress.org/trunk@49057 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-09-27 05:15:03 +00:00
parent 3366793a8d
commit 73779aaa0a
1 changed files with 1 additions and 0 deletions

View File

@ -911,6 +911,7 @@ abstract class ParagonIE_Sodium_Core_Util
if ($mbstring === null) {
$mbstring = extension_loaded('mbstring')
&& defined('MB_OVERLOAD_STRING')
&&
((int) (ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING);
}