diff options
author | Andreas Fischer <bantu@owncloud.com> | 2013-11-26 11:50:14 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2013-11-26 11:50:14 +0100 |
commit | 9fb1da28110192422e7ca7ee8b0fe6996687d3c0 (patch) | |
tree | a3daf4d81ddc9d93da264383e3a6aab242fba09f /lib | |
parent | dc67c7efa9ff20f8b4466e5b6490405439d4a90f (diff) | |
download | nextcloud-server-9fb1da28110192422e7ca7ee8b0fe6996687d3c0.tar.gz nextcloud-server-9fb1da28110192422e7ca7ee8b0fe6996687d3c0.zip |
Use bindValue() instead of passing parameters in execute().
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/share.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 6178a5ae043..e887740ac4c 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; } |