1
0
Fork 0

Prevent uncaught exception when iconv/mbstring are missing; fixes #10168 (#10224)

pull/10231/head
Cédric Anne 2021-10-27 09:39:15 +02:00 committed by GitHub
parent 135f806f6f
commit f0d621e101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,12 @@ if (defined('HHVM_VERSION') && version_compare(HHVM_VERSION, '4.0', '>=')) {
echo 'HHVM 4.0 has dropped support for Composer, please use PHP instead. Aborting.'.PHP_EOL; echo 'HHVM 4.0 has dropped support for Composer, please use PHP instead. Aborting.'.PHP_EOL;
exit(1); exit(1);
} }
if (!extension_loaded('iconv') && !extension_loaded('mbstring')) {
echo 'The iconv OR mbstring extension is required and both are missing.'
.PHP_EOL.'Install either of them or recompile php without --disable-iconv.'
.PHP_EOL.'Aborting.'.PHP_EOL;
exit(1);
}
if (function_exists('ini_set')) { if (function_exists('ini_set')) {
@ini_set('display_errors', '1'); @ini_set('display_errors', '1');