From 40d389d13c6c0838b3a889a93fe3922e49d3b8ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sun, 25 Apr 2021 12:25:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Di/Container.php | 2 +- System/Snowflake.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/System/Di/Container.php b/System/Di/Container.php index fecf6d97..b6a1ab5f 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -164,7 +164,7 @@ class Container extends BaseObject * @param $dependencies * @return mixed */ - private function newInstance($reflect, $dependencies) + private function newInstance($reflect, $dependencies): mixed { if (!empty($dependencies)) { return $reflect->newInstanceArgs($dependencies); diff --git a/System/Snowflake.php b/System/Snowflake.php index bc957eaa..af377ba6 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -307,6 +307,9 @@ class Snowflake public static function configure($object, $config): mixed { foreach ($config as $key => $value) { + if (is_numeric($key)) { + continue; + } if (!property_exists($object, $key)) { continue; }