From 46a03a8b863f0f4b97a79a07272f2ca3489dd50d Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 20 Jun 2025 09:08:45 +0300 Subject: [PATCH] refactor: Changed some `php_sapi_name()` to `PHP_SAPI` constants --- _cleanup.php | 2 +- _release.php | 2 +- install.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_cleanup.php b/_cleanup.php index 64238c44d..b52960c18 100644 --- a/_cleanup.php +++ b/_cleanup.php @@ -13,7 +13,7 @@ if (!defined('BB_ROOT')) { } // Check CLI mode -if (php_sapi_name() !== 'cli') { +if (PHP_SAPI != 'cli') { exit; } diff --git a/_release.php b/_release.php index 2686e144c..1514275fe 100644 --- a/_release.php +++ b/_release.php @@ -11,7 +11,7 @@ define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR); define('BB_PATH', BB_ROOT); // Check CLI mode -if (php_sapi_name() !== 'cli') { +if (PHP_SAPI != 'cli') { die('Please run php ' . basename(__FILE__) . ' in CLI mode'); } diff --git a/install.php b/install.php index 4f65f3418..084c3daab 100644 --- a/install.php +++ b/install.php @@ -11,7 +11,7 @@ define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR); define('BB_PATH', BB_ROOT); // Check CLI mode -if (php_sapi_name() !== 'cli') { +if (PHP_SAPI != 'cli') { die('Please run php ' . basename(__FILE__) . ' in CLI mode'); }