Skip to content

Commit 53e0082

Browse files
Perform version check before including sourcecode files (because they could be incompatible with the version of PHP being used)
1 parent 8ddd0dd commit 53e0082

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

build/binary-phar-autoload.php.in

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ if (__FILE__ == realpath($GLOBALS['_SERVER']['SCRIPT_NAME'])) {
66
$execute = false;
77
}
88

9-
define('__PHPUNIT_PHAR__', str_replace(DIRECTORY_SEPARATOR, '/', __FILE__));
10-
define('__PHPUNIT_PHAR_ROOT__', 'phar://___PHAR___');
11-
12-
Phar::mapPhar('___PHAR___');
13-
14-
___FILELIST___
15-
169
if ($execute) {
1710
if (version_compare('5.3.3', PHP_VERSION, '>') && $argv[1] !== '--version') {
1811
fwrite(
@@ -27,7 +20,16 @@ if ($execute) {
2720

2821
die(1);
2922
}
23+
}
3024

25+
define('__PHPUNIT_PHAR__', str_replace(DIRECTORY_SEPARATOR, '/', __FILE__));
26+
define('__PHPUNIT_PHAR_ROOT__', 'phar://___PHAR___');
27+
28+
Phar::mapPhar('___PHAR___');
29+
30+
___FILELIST___
31+
32+
if ($execute) {
3133
if (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == '--manifest') {
3234
print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/manifest.txt');
3335
exit;

0 commit comments

Comments
 (0)