1
0
Fork 0

AutoloadGenerator: Trigger native PHP error on platform checks fails

pull/9414/head
Jakub Bouček 2020-11-04 12:00:12 +01:00
parent 6f1761fe18
commit 3f63bc9205
No known key found for this signature in database
GPG Key ID: 225FDC9C0BFAA273
1 changed files with 5 additions and 4 deletions

View File

@ -734,10 +734,11 @@ EXT_CHECKS;
\$issues = array();
${requiredPhp}${requiredExtensions}
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";
exit(104);
if (\$issues) {
trigger_error(
'Composer detected issues in your platform: ' . implode(', ', \$issues),
E_USER_ERROR
);
}
PLATFORM_CHECK;