From 2f3be8cabccee3c9b9e1ea3f8f7d323b8f417fda Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 10 Nov 2021 02:33:54 +0800 Subject: [PATCH] 1 --- src/Base/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Base/Model.php b/src/Base/Model.php index b0edabf..7d19fdf 100644 --- a/src/Base/Model.php +++ b/src/Base/Model.php @@ -541,7 +541,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T [$sql, $param] = SqlBuilder::builder(static::query())->insert($param); $dbConnection = $this->getConnection()->createCommand($sql, $param); if (!($lastId = $dbConnection->save(true, $this->getAutoIncrement()))) { - var_dump($lastId, $this->getAutoIncrement(), $this->getLastError()); + file_put_contents('php://input',sprintf('%s %s %s',$lastId, static::className().'::'.$this->getAutoIncrement(), $this->getLastError()).PHP_EOL); throw new Exception('保存失败.'); } $lastId = $this->setPrimary((int)$lastId, $param);