|
|
@@ -1921,7 +1921,7 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
|
|
|
$id = (array)$this->_newId($primary) + $keys;
|
|
|
|
|
|
// Generate primary keys preferring values in $data.
|
|
|
- $primary = array_combine($primary, $id);
|
|
|
+ $primary = array_combine($primary, $id) ?: [];
|
|
|
$primary = array_intersect_key($data, $primary) + $primary;
|
|
|
|
|
|
$filteredKeys = array_filter($primary, function ($v) {
|