Skip to content

Commit

Permalink
Merge pull request from GHSA-jm6m-4632-36hf
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Sep 29, 2023
1 parent a4acd96 commit 4fce147
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/composer
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4fce147

Please sign in to comment.