platform_check.php 925 B

1234567891011121314151617181920212223242526
  1. <?php
  2. // platform_check.php @generated by Composer
  3. $issues = array();
  4. if (!(PHP_VERSION_ID >= 70000)) {
  5. $issues[] = 'Your Composer dependencies require a PHP version ">= 7.0.0". You are running ' . PHP_VERSION . '.';
  6. }
  7. if ($issues) {
  8. if (!headers_sent()) {
  9. header('HTTP/1.1 500 Internal Server Error');
  10. }
  11. if (!ini_get('display_errors')) {
  12. if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
  13. fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
  14. } elseif (!headers_sent()) {
  15. echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
  16. }
  17. }
  18. trigger_error(
  19. 'Composer detected issues in your platform: ' . implode(' ', $issues),
  20. E_USER_ERROR
  21. );
  22. }