mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-26 20:24:39 +01:00
Add bootstrap.php checking environment (MB_OVERLOAD_STRING).
This commit is contained in:
parent
da36b5c91e
commit
29659f877d
@ -66,15 +66,11 @@
|
||||
},
|
||||
"include-path": ["phpseclib/"],
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Crypt": "phpseclib/",
|
||||
"File": "phpseclib/",
|
||||
"Math": "phpseclib/",
|
||||
"Net": "phpseclib/",
|
||||
"System": "phpseclib/"
|
||||
},
|
||||
"files": [
|
||||
"phpseclib/Crypt/Random.php"
|
||||
]
|
||||
"phpseclib/bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"phpseclib\\": "phpseclib/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
569
composer.lock
generated
569
composer.lock
generated
File diff suppressed because it is too large
Load Diff
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