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

main
Cédric Anne 3 years ago committed by GitHub
parent 135f806f6f
commit f0d621e101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
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')) {
@ini_set('display_errors', '1');

Loading…
Cancel
Save