From 5deb86acffadb4bdd1765961c3b316a2e00fad1f Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Mon, 5 Nov 2018 19:07:33 +0100 Subject: [PATCH] core: Replace PHP_VERSION_REQUIRED by static text The required PHP version is used in one place only and therefore shouldn't require a constant --- index.php | 2 -- lib/Configuration.php | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index bf5c234c..6d11346c 100644 --- a/index.php +++ b/index.php @@ -28,8 +28,6 @@ if(file_exists('DEBUG')) { require_once __DIR__ . '/lib/RssBridge.php'; -define('PHP_VERSION_REQUIRED', '5.6.0'); - // Specify directory for cached files (using FileCache) define('CACHE_DIR', __DIR__ . '/cache'); diff --git a/lib/Configuration.php b/lib/Configuration.php index b76744f5..bc7b5895 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -8,8 +8,8 @@ class Configuration { public static function verifyInstallation() { // Check PHP version - if(version_compare(PHP_VERSION, PHP_VERSION_REQUIRED) === -1) - die('RSS-Bridge requires at least PHP version ' . PHP_VERSION_REQUIRED . '!'); + if(version_compare(PHP_VERSION, '5.6.0') === -1) + die('RSS-Bridge requires at least PHP version 5.6.0!'); // extensions check if(!extension_loaded('openssl'))