This commit is contained in:
2020-11-17 18:48:55 +08:00
parent 88d7d5100a
commit 05f93d8e9c
+1 -1
View File
@@ -124,7 +124,7 @@ class ActiveRecord extends BaseActiveRecord
} }
$select = new static(); $select = new static();
$select->attributes = $attributes; $select->attributes = $attributes;
if ($select->save()) { if (!$select->save()) {
throw new Exception($select->getLastError()); throw new Exception($select->getLastError());
} }
return $select; return $select;