Fix syntax error and unsafe call to ActiveRow::getTable

This commit is contained in:
Celestora 2022-04-12 22:42:24 +03:00
parent 3b4a38832e
commit b8fcf3d8e9
1 changed files with 2 additions and 2 deletions

View File

@ -94,9 +94,9 @@ abstract class DBEntity
if(is_null($this->record)) {
$this->record = $this->getTable()->insert($this->changes);
} else if($this->deleted) {
$this->record = $this->getTable()->insert((array) $this-->record);
$this->record = $this->getTable()->insert((array) $this->record);
} else {
$this->record->getTable()->where("id", $this->record->id)->update($this->changes);
$this->getTable()->get($this->record->id)->update($this->changes);
$this->record = $this->getTable()->get($this->record->id);
}