PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 All 211 releases
charitable / vendor / composer / platform_check.php

platform_check.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at vendor/composer/platform_check.php

36 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // platform_check.php @generated by Composer
4 // Modified for Charitable plugin to conditionally apply PHP requirements
5
6 // Define a constant that can be checked elsewhere
7 if (!defined('CHARITABLE_SQUARE_AVAILABLE')) {
8 define('CHARITABLE_SQUARE_AVAILABLE', PHP_VERSION_ID >= 80100);
9 }
10
11 // Only enforce PHP version requirement if Square is being used
12 $skipVersionCheck = !CHARITABLE_SQUARE_AVAILABLE;
13
14 $issues = array();
15
16 if (!$skipVersionCheck && !(PHP_VERSION_ID >= 80100)) {
17 $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
18 }
19
20 if ($issues) {
21 if (!headers_sent()) {
22 header('HTTP/1.1 500 Internal Server Error');
23 }
24 if (!ini_get('display_errors')) {
25 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
26 fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
27 } elseif (!headers_sent()) {
28 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;
29 }
30 }
31 trigger_error(
32 'Composer detected issues in your platform: ' . implode(' ', $issues),
33 E_USER_ERROR
34 );
35 }
36