1
0
Fork 0

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

pull/11670/head
Jordi Boggiano 2023-09-29 10:15:51 +02:00 committed by GitHub
parent b608b8e87e
commit 955a48e631
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;
}