Skip to content

Commit

Permalink
Handle invalid PHP version strings
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah authored and sebastianbergmann committed Jun 23, 2021
1 parent 2b0a4bb commit 2582385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/templates/binary-phar-autoload.php.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env php
<?php
if (substr(PHP_VERSION, 0 - strlen('-(to be removed in future macOS)')) === '-(to be removed in future macOS)') {
if (!version_compare(PHP_VERSION, PHP_VERSION, "=")) {
fwrite(
STDERR,
sprintf(
Expand Down

0 comments on commit 2582385

Please sign in to comment.