From c91671f17634fdc98ce7d780e6f4dcb00b51bf71 Mon Sep 17 00:00:00 2001 From: yangming Date: Wed, 29 Sep 2021 11:26:25 +0800 Subject: [PATCH] mbstring.func_overload is deprecated in php 6.2 and removed in php 8.0 --- phpseclib/bootstrap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpseclib/bootstrap.php b/phpseclib/bootstrap.php index 0da0999f..92613a01 100644 --- a/phpseclib/bootstrap.php +++ b/phpseclib/bootstrap.php @@ -7,7 +7,8 @@ if (extension_loaded('mbstring')) { // 2 - MB_OVERLOAD_STRING - if (ini_get('mbstring.func_overload') & 2) { + // mbstring.func_overload is deprecated in php 7.2 and removed in php 8.0. + if ((PHP_VERSION_ID < 80000) && ini_get('mbstring.func_overload') & 2) { throw new \UnexpectedValueException( 'Overloading of string functions using mbstring.func_overload ' . 'is not supported by phpseclib.'