1
0
Fork 0

Merge pull request from GHSA-jm6m-4632-36hf

1.10
Jordi Boggiano 2023-09-29 10:15:51 +02:00 committed by GitHub
parent a4acd96ad3
commit 4fce14795a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,11 @@
<?php
if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
if (0 === strpos(__FILE__, 'phar:') && ini_get('register_argc_argv')) {
echo 'Composer cannot be run safely on non-CLI SAPIs with register_argc_argv=On. Aborting.'.PHP_EOL;
exit(1);
}
echo 'Warning: Composer should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
}