From ce99f6e465453bd49cc8740d252fb71e3142ac93 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 4 Sep 2023 14:56:45 +0800 Subject: [PATCH] * Compatible with PHP 5.4 and below. --- framework/helper.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/helper.class.php b/framework/helper.class.php index 142f9d6267..061ee829a5 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -424,7 +424,7 @@ class helper extends baseHelper public static function arrayColumn(array $input, int|string|null $columnKey, int|string|null $indexKey = null): array { /* If php version greater than 7, calling system functions returns. */ - if(PHP_VERSION_ID >= 70000) return \array_column($input, $columnKey, $indexKey); + if(defined(PHP_VERSION_ID) && PHP_VERSION_ID >= 70000) return \array_column($input, $columnKey, $indexKey); $output = array(); foreach($input as $row)