1
0
Fork 0

Merge pull request #12230 from Seldaek/duplicate_errors

Fixes #12214
pull/12233/head
Jordi Boggiano 2024-12-11 09:26:04 +01:00 committed by GitHub
commit a383632641
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -42,7 +42,12 @@ if (!extension_loaded('iconv') && !extension_loaded('mbstring')) {
} }
if (function_exists('ini_set')) { if (function_exists('ini_set')) {
@ini_set('display_errors', '1'); // check if error logging is on, but to an empty destination - for the CLI SAPI, that means stderr
$logsToSapiDefault = ('' === ini_get('error_log') && (bool) ini_get('log_errors'));
// on the CLI SAPI, ensure errors are displayed on stderr, either via display_errors or via error_log
if (PHP_SAPI === 'cli') {
@ini_set('display_errors', $logsToSapiDefault ? '0' : 'stderr');
}
// Set user defined memory limit // Set user defined memory limit
if ($memoryLimit = getenv('COMPOSER_MEMORY_LIMIT')) { if ($memoryLimit = getenv('COMPOSER_MEMORY_LIMIT')) {