Import: handle empty sets
This commit is contained in:
parent
38c4c06c77
commit
dd06be4a58
|
@ -102,8 +102,17 @@ continue;
|
|||
$db->beginTransaction();
|
||||
if (! $this->rowSetExists($rowset)) {
|
||||
|
||||
$newRows = $this->newChecksums('imported_row', $rowSums);
|
||||
$newProperties = $this->newChecksums('imported_property', array_keys($props));
|
||||
if (empty($rowSums)) {
|
||||
$newRows = array();
|
||||
} else {
|
||||
$newRows = $this->newChecksums('imported_row', $rowSums);
|
||||
}
|
||||
|
||||
if (empty($rowSums)) {
|
||||
$newProperties = array();
|
||||
} else {
|
||||
$newProperties = $this->newChecksums('imported_property', array_keys($props));
|
||||
}
|
||||
|
||||
$db->insert('imported_rowset', array('checksum' => $rowset));
|
||||
|
||||
|
|
Loading…
Reference in New Issue