diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 30a8ebd47..6d77a367d 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -656,17 +656,17 @@ }, { "name": "topthink/think-orm", - "version": "v2.0.38", - "version_normalized": "2.0.38.0", + "version": "v2.0.39", + "version_normalized": "2.0.39.0", "source": { "type": "git", "url": "https://github.com/top-think/think-orm.git", - "reference": "48e01bd25fdd51afee95343a4381fabc5a9cb764" + "reference": "39a9d0a0e52d9b8bad9d98484d8484cdf5b683a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-orm/zipball/48e01bd25fdd51afee95343a4381fabc5a9cb764", - "reference": "48e01bd25fdd51afee95343a4381fabc5a9cb764", + "url": "https://api.github.com/repos/top-think/think-orm/zipball/39a9d0a0e52d9b8bad9d98484d8484cdf5b683a7", + "reference": "39a9d0a0e52d9b8bad9d98484d8484cdf5b683a7", "shasum": "", "mirrors": [ { @@ -686,7 +686,7 @@ "require-dev": { "phpunit/phpunit": "^7|^8|^9.5" }, - "time": "2021-02-24T00:54:36+00:00", + "time": "2021-02-26T10:20:00+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -863,12 +863,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "a273990298618e97fb7a03082f7a032ba0ad548c" + "reference": "c05b7fc33aeb089452e98cd70645148124ff8dff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a273990298618e97fb7a03082f7a032ba0ad548c", - "reference": "a273990298618e97fb7a03082f7a032ba0ad548c", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/c05b7fc33aeb089452e98cd70645148124ff8dff", + "reference": "c05b7fc33aeb089452e98cd70645148124ff8dff", "shasum": "", "mirrors": [ { @@ -885,7 +885,7 @@ "ext-mbstring": "*", "topthink/framework": "^6.0" }, - "time": "2021-03-01T02:53:44+00:00", + "time": "2021-03-01T07:21:42+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 227168bd9..2eab44084 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/topthink/think-orm/src/Model.php b/vendor/topthink/think-orm/src/Model.php index 7d19615fa..5319edc6e 100644 --- a/vendor/topthink/think-orm/src/Model.php +++ b/vendor/topthink/think-orm/src/Model.php @@ -967,7 +967,10 @@ abstract class Model implements JsonSerializable, ArrayAccess, Arrayable, Jsonab */ public function __unset(string $name): void { - unset($this->data[$name], $this->relation[$name]); + unset($this->data[$name], + $this->get[$name], + $this->set[$name], + $this->relation[$name]); } // ArrayAccess diff --git a/vendor/topthink/think-orm/src/db/Builder.php b/vendor/topthink/think-orm/src/db/Builder.php index 3b009431a..914dd705f 100644 --- a/vendor/topthink/think-orm/src/db/Builder.php +++ b/vendor/topthink/think-orm/src/db/Builder.php @@ -15,7 +15,6 @@ namespace think\db; use Closure; use PDO; use think\db\exception\DbException as Exception; -use function count; /** * Db Builder @@ -758,7 +757,7 @@ abstract class Builder } else { $value = array_unique(is_array($value) ? $value : explode(',', $value)); if (count($value) === 0) { - return '0 = 1'; + return 'IN' == $exp ? '0 = 1' : '1 = 1'; } $array = []; @@ -770,7 +769,7 @@ abstract class Builder if (count($array) == 1) { return $key . ('IN' == $exp ? ' = ' : ' <> ') . $array[0]; } else { - $value = implode(',', $array); + $value = implode(',', $array); } } diff --git a/vendor/topthink/think-orm/src/model/concern/Attribute.php b/vendor/topthink/think-orm/src/model/concern/Attribute.php index 99c9f807a..737e29d3e 100644 --- a/vendor/topthink/think-orm/src/model/concern/Attribute.php +++ b/vendor/topthink/think-orm/src/model/concern/Attribute.php @@ -268,7 +268,9 @@ trait Attribute return $this->origin; } - return array_key_exists($name, $this->origin) ? $this->origin[$name] : null; + $fieldName = $this->getRealFieldName($name); + + return array_key_exists($fieldName, $this->origin) ? $this->origin[$fieldName] : null; } /** @@ -332,6 +334,7 @@ trait Attribute $name = $this->getRealFieldName($name); $this->data[$name] = $value; + unset($this->get[$name]); } /** @@ -380,6 +383,7 @@ trait Attribute // 设置数据对象属性 $this->data[$name] = $value; + unset($this->get[$name]); } /** diff --git a/vendor/zoujingli/think-library/src/command/Queue.php b/vendor/zoujingli/think-library/src/command/Queue.php index 287118ccb..3390e341f 100644 --- a/vendor/zoujingli/think-library/src/command/Queue.php +++ b/vendor/zoujingli/think-library/src/command/Queue.php @@ -97,7 +97,7 @@ class Queue extends Command $host = $this->input->getOption('host') ?: '127.0.0.1'; $root = $this->app->getRootPath() . 'public' . DIRECTORY_SEPARATOR; $command = "php -S {$host}:{$port} -t {$root} {$root}router.php"; - $this->output->comment("># {$command}"); + $this->output->comment(">$ {$command}"); if (count($result = $this->process->query($command)) > 0) { if ($this->process->iswin()) $this->process->exec("start http://{$host}:{$port}"); $this->output->writeln("># WebServer process already exist for pid {$result[0]['pid']}");