From 05aa80866d78dff704f2d08297ee5bf4cd500b36 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Wed, 9 Jul 2025 12:44:59 +0800 Subject: [PATCH] * [misc] compatibility with PHP8.4 --- lib/zin/core/props.class.php | 2 +- lib/zin/core/set.class.php | 2 +- lib/zin/core/setting.class.php | 2 +- lib/zin/zentao/field.class.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/zin/core/props.class.php b/lib/zin/core/props.class.php index 65d09537dc..0270a6da82 100644 --- a/lib/zin/core/props.class.php +++ b/lib/zin/core/props.class.php @@ -109,7 +109,7 @@ class props extends \zin\utils\dataset if($value) $this->setVal($name, $value); } - public function bindEvent(string|array $name, ?string|array $handler = null) + public function bindEvent(string|array $name, mixed $handler = null) { if(is_array($name)) { diff --git a/lib/zin/core/set.class.php b/lib/zin/core/set.class.php index 0658d386a1..8cb74d8506 100644 --- a/lib/zin/core/set.class.php +++ b/lib/zin/core/set.class.php @@ -25,7 +25,7 @@ class set extends setting implements iDirective * @param array|object|string $data Properties list array. * @param mixed $value Property value. */ - public function __construct(?array|object|string $data = null, mixed $value = null) + public function __construct(mixed $data = null, mixed $value = null) { parent::__construct($data, $value); diff --git a/lib/zin/core/setting.class.php b/lib/zin/core/setting.class.php index 30adefb471..eded89252d 100644 --- a/lib/zin/core/setting.class.php +++ b/lib/zin/core/setting.class.php @@ -136,7 +136,7 @@ class setting extends \zin\utils\dataset * @param mixed $value - Setting value. * @return setting */ -function setting(?array|string $setting = null, mixed $value = null): setting +function setting(mixed $setting = null, mixed $value = null): setting { return new setting($setting, $value); } diff --git a/lib/zin/zentao/field.class.php b/lib/zin/zentao/field.class.php index 39f57b4e61..958337b2a0 100644 --- a/lib/zin/zentao/field.class.php +++ b/lib/zin/zentao/field.class.php @@ -26,7 +26,7 @@ class field extends setting public mixed $default; - public function __construct(?string|object|array $nameOrProps = null, ?fieldList $fieldList = null, ?field $parent = null) + public function __construct(mixed $nameOrProps = null, ?fieldList $fieldList = null, ?field $parent = null) { $this->fieldList = $fieldList; $this->parent = $parent;