From 48400763669198655974979d56f2cbc3f724ca23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 11 Nov 2020 15:16:35 +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 --- Database/ActiveRecord.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index 62c1d108..7c22f79b 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -277,7 +277,10 @@ class ActiveRecord extends BaseActiveRecord */ private function resolveObject($data) { - if (is_numeric($data) || !method_exists($this, $data)) { + if (is_numeric($data) || !is_string($data)) { + return $data; + } + if (!method_exists($this, $data)) { return $data; } return ArrayAccess::toArray($this->{$data}());