mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 11:20:03 +00:00
Add bootstrap.php checking environment (MB_OVERLOAD_STRING).
This commit is contained in:
parent
772d4df597
commit
cd57bf31ae
@ -61,6 +61,9 @@
|
|||||||
},
|
},
|
||||||
"include-path": ["phpseclib/"],
|
"include-path": ["phpseclib/"],
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"phpseclib/bootstrap.php"
|
||||||
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"phpseclib\\": "phpseclib/"
|
"phpseclib\\": "phpseclib/"
|
||||||
}
|
}
|
||||||
|
2
composer.lock
generated
2
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "b24ab20be15b6312e532ee2ffa18d5fa",
|
"hash": "98a14889a81b2d6ecbb029483e954dec",
|
||||||
"packages": [],
|
"packages": [],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
|
16
phpseclib/bootstrap.php
Normal file
16
phpseclib/bootstrap.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Bootstrapping File for phpseclib
|
||||||
|
*
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (extension_loaded('mbstring')) {
|
||||||
|
// 2 - MB_OVERLOAD_STRING
|
||||||
|
if (ini_get('mbstring.func_overload') & 2) {
|
||||||
|
throw new \UnexpectedValueException(
|
||||||
|
'Overloading of string functions using mbstring.func_overload ' .
|
||||||
|
'is not supported by phpseclib.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user