Use bindValue() instead of passing parameters in execute().
This commit is contained in:
parent
dc67c7efa9
commit
9fb1da2811
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue