This commit is contained in:
2021-08-06 18:03:31 +08:00
parent c2ebe4c670
commit 26fc318af5
+3
View File
@@ -511,6 +511,9 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
*/ */
private function updateInternal($fields, $condition, $param): bool|static private function updateInternal($fields, $condition, $param): bool|static
{ {
if (empty($param)) {
return true;
}
if ($this->hasPrimary()) { if ($this->hasPrimary()) {
$condition = [$this->getPrimary() => $this->getPrimaryValue()]; $condition = [$this->getPrimary() => $this->getPrimaryValue()];
} }