add a version check, the third argument in getopt requires PHP >= 7.1

This commit is contained in:
El RIDO
2022-11-06 08:05:41 +01:00
parent 14075cea78
commit 669c98550c
2 changed files with 8 additions and 0 deletions

View File

@@ -10,6 +10,10 @@ require PATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
use PrivateBin\Configuration;
use PrivateBin\Model;
// third argument in getopt requires PHP >= 7.1
if (version_compare(PHP_VERSION, '7.1.0') < 0) {
dieerr('migrate requires php 7.1 or above to work. Sorry.');
}
$longopts = array(
"delete-after",