Use bindValue() instead of passing parameters in execute().

This commit is contained in:
Andreas Fischer 2013-11-26 11:50:14 +01:00
parent dc67c7efa9
commit 9fb1da2811
1 changed files with 3 additions and 1 deletions

View File

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