From 4ef3b36160ee00055bb8bb2a705a206d7aa0eb36 Mon Sep 17 00:00:00 2001 From: erwin Date: Tue, 9 Dec 2025 11:13:19 +0100 Subject: [PATCH] Refactor PHP version check to Yii 1 convention. --- framework/web/CHttpSession.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/CHttpSession.php b/framework/web/CHttpSession.php index 4a79a10fb..95a8a7e32 100644 --- a/framework/web/CHttpSession.php +++ b/framework/web/CHttpSession.php @@ -120,7 +120,7 @@ class CHttpSession extends CApplicationComponent implements IteratorAggregate,Ar // Use object-style handler on PHP 7.0+ to avoid deprecation. // CHttpSessionHandler is in a separate file to avoid parse errors on PHP 5.3 // where SessionHandlerInterface doesn't exist. - if(PHP_VERSION_ID >= 70000) + if(version_compare(PHP_VERSION, '7.0', '>=')) { require_once(dirname(__FILE__) . '/CHttpSessionHandler.php'); @session_set_save_handler(new CHttpSessionHandler($this), true);