1
0
Fork 0

AutoloadGenerator: Send error HTTP status on error

pull/9410/head
Jakub Bouček 2020-11-03 20:20:32 +01:00
parent 70add1867c
commit b83b186ac0
No known key found for this signature in database
GPG Key ID: 225FDC9C0BFAA273
1 changed files with 2 additions and 1 deletions

View File

@ -734,7 +734,8 @@ EXT_CHECKS;
\$issues = array(); \$issues = array();
${requiredPhp}${requiredExtensions} ${requiredPhp}${requiredExtensions}
if (\$issues) { if (\$issues && !headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
echo 'Composer detected issues in your platform:' . "\\n\\n" . implode("\\n", \$issues) . "\\n\\n"; echo 'Composer detected issues in your platform:' . "\\n\\n" . implode("\\n", \$issues) . "\\n\\n";
exit(104); exit(104);
} }