Update logic
parent
008129be49
commit
3a2d1c5f9c
11
bin/composer
11
bin/composer
|
@ -42,12 +42,11 @@ if (!extension_loaded('iconv') && !extension_loaded('mbstring')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('ini_set')) {
|
if (function_exists('ini_set')) {
|
||||||
// if display_errors is set to stderr or unset, we set it
|
// check if error logging is on, but to an empty destination - for the CLI SAPI, that means stderr
|
||||||
if ('stderr' !== ini_get('display_errors') && !(bool) ini_get('display_errors')) {
|
$logsToSapiDefault = ('' === ini_get('error_log') && (bool) ini_get('log_errors'));
|
||||||
// except if we're on a CLI SAPI with log errors enabled and the error_log is empty, in which case errors already go to stderr
|
// on the CLI SAPI, ensure errors are displayed on stderr, either via display_errors or via error_log
|
||||||
if (!(bool) ini_get('log_errors') || PHP_SAPI !== 'cli' || '' !== ini_get('error_log')) {
|
if (PHP_SAPI === 'cli') {
|
||||||
@ini_set('display_errors', PHP_SAPI === 'cli' ? 'stderr' : '1');
|
@ini_set('display_errors', $logsToSapiDefault ? '0' : 'stderr');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set user defined memory limit
|
// Set user defined memory limit
|
||||||
|
|
Loading…
Reference in New Issue