diff --git a/lib/public/share.php b/lib/public/share.php index 6178a5ae04..e887740ac4 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -826,8 +826,10 @@ class Share { $date = date('Y-m-d H:i', $date->format('U') - $date->getOffset()); } $query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `expiration` = ? WHERE `id` = ?'); + $query->bindValue(1, $date); foreach ($items as $item) { - $query->execute(array($date, $item['id'])); + $query->bindValue(2, (int) $item['id']); + $query->execute(); } return true; }