From 1b17858887d519cbb01c17d02b14d7aa14c16e3e Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 22 Jan 2017 13:45:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BModel=E7=B1=BBtoCollection?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index 8cf92f73..4a82c5c6 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -654,7 +654,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess if ($this->resultSetType) { if ('collection' == $this->resultSetType) { $collection = new Collection($collection); - } else { + } elseif (false !== strpos($this->resultSetType, '\\')) { $class = $this->resultSetType; $collection = new $class($collection); }