mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
add a version check, the third argument in getopt requires PHP >= 7.1
This commit is contained in:
parent
14075cea78
commit
669c98550c
@ -10,6 +10,10 @@ require PATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
|||||||
use PrivateBin\Configuration;
|
use PrivateBin\Configuration;
|
||||||
use PrivateBin\Model;
|
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(
|
$longopts = array(
|
||||||
"delete-after",
|
"delete-after",
|
||||||
|
@ -54,6 +54,10 @@ class MigrateTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testMigrate()
|
public function testMigrate()
|
||||||
{
|
{
|
||||||
|
if (version_compare(PHP_VERSION, '7.1.0') < 0) {
|
||||||
|
return; // skip test on unsupported PHP versions
|
||||||
|
}
|
||||||
|
|
||||||
$this->_model_1->delete(Helper::getPasteId());
|
$this->_model_1->delete(Helper::getPasteId());
|
||||||
$this->_model_2->delete(Helper::getPasteId());
|
$this->_model_2->delete(Helper::getPasteId());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user