Bug fix: don't save an item if the id is empty

This commit is contained in:
Frederic Guillot 2013-03-21 19:58:34 -04:00
parent 164db00f35
commit 7a29e07ba0

View File

@ -226,7 +226,7 @@ function update_items($feed_id, array $items)
foreach ($items as $item) {
if (! $db->table('items')->eq('id', $item->id)->count()) {
if ($item->id && ! $db->table('items')->eq('id', $item->id)->count()) {
$db->table('items')->save(array(
'id' => $item->id,