From 94dcdea999a1b28a920310ebdc8dde2bf32b4d47 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 7 Nov 2022 17:11:30 +0100 Subject: [PATCH] Update phar.php --- phar.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phar.php b/phar.php index dbbc17a..6c65b5b 100644 --- a/phar.php +++ b/phar.php @@ -41,10 +41,13 @@ class Installer public function __construct() { if ((PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION < 1) || PHP_MAJOR_VERSION < 7) { - throw new \Exception('MadelineProto requires at least PHP 7.1 to run, PHP 8.1+ is recommended.'); + throw new \Exception('MadelineProto requires at least PHP 8.1.'); + } + if ((PHP_MAJOR_VERSION === 8 && PHP_MINOR_VERSION < 1) || PHP_MAJOR_VERSION === 7) { + trigger_error('MadelineProto requires at least PHP 8.1.'); } if (PHP_INT_SIZE < 8) { - throw new \Exception('A 64-bit build of PHP is required to run MadelineProto, PHP 8.1+ recommended.'); + throw new \Exception('A 64-bit build of PHP is required to run MadelineProto, PHP 8.1 is required.'); } $backtrace = \debug_backtrace(0); if (\count($backtrace) === 1) {