From 57ad4e5fd341228498ee403f27e46e7409a94228 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E0=BE=85=E0=BC=BB=20=C7=AC=C9=80=C4=A7=20=E0=BC=84?= =?utf8?q?=E0=BC=86=E0=BD=89?= Date: Mon, 17 Apr 2017 22:36:22 +0200 Subject: [PATCH] Use PHP_VERSION_ID This makes calls to phpversion() and version_compare() unnecessary. Fixes #1951 --- includes/functions-install.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions-install.php b/includes/functions-install.php index 3c4fa70..363edb1 100644 --- a/includes/functions-install.php +++ b/includes/functions-install.php @@ -40,11 +40,11 @@ function yourls_get_database_version() { } /** - * Check if PHP > 5.2 + * Check if PHP > 5.3 * */ function yourls_check_php_version() { - return ( version_compare( '5.2', phpversion() ) <= 0 ); + return(defined('PHP_VERSION_ID') && PHP_VERSION_ID > 50300); } /** @@ -342,4 +342,4 @@ function yourls_maintenance_mode( $maintenance = true ) { } else { return @unlink($file); } -} \ No newline at end of file +} -- 2.42.0