diff --git a/system/Model.php b/system/Model.php index 93d55feaa985..04a88df52574 100644 --- a/system/Model.php +++ b/system/Model.php @@ -817,6 +817,12 @@ public function update($id = null, $data = null): bool $data = (array) $data; } + // If it's still empty here, means $data is no change or is empty object + if (empty($data)) + { + throw DataException::forEmptyDataset('update'); + } + // Validate data before saving. if ($this->skipValidation === false) {