From 28323f1bb8aa7ce0474e14f2bc6f4d72e9ec1bd7 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 23 Dec 2022 02:04:25 +0900 Subject: [PATCH] Check PHP version in common/autoload.php --- common/autoload.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/autoload.php b/common/autoload.php index 9ce12432d..35123d5cd 100644 --- a/common/autoload.php +++ b/common/autoload.php @@ -8,6 +8,16 @@ if (defined('RX_VERSION')) return; } +/** + * Check PHP version. + */ +if (version_compare(PHP_VERSION, '7.2', '<')) +{ + header('HTTP/1.1 500 Internal Server Error'); + echo 'Rhymix requires PHP 7.2 or higher.'; + exit(1); +} + /** * Set error reporting rules. */