summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-10-07 11:06:24 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-10-07 11:06:24 +0200
commit288f01bf6262d825527d71ba262bcaa5d082268d (patch)
tree804b3d09a99ba9d397c17783d1b90091c3b7b7f2 /apps/files_sharing
parent4f67b7a6c34d8e4ff36540ba155c75fb8e44eb7e (diff)
downloadnextcloud-server-288f01bf6262d825527d71ba262bcaa5d082268d.tar.gz
nextcloud-server-288f01bf6262d825527d71ba262bcaa5d082268d.zip
catch exception if db query execution fails
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/updater.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php
index e40cbc17dc1..08aaa62e252 100644
--- a/apps/files_sharing/lib/updater.php
+++ b/apps/files_sharing/lib/updater.php
@@ -67,7 +67,11 @@ class Shared_Updater {
$fileSource = $fileInfo['fileid'];
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `file_source`=?');
- \OC_DB::executeAudited($query, array($fileSource));
+ try {
+ \OC_DB::executeAudited($query, array($fileSource));
+ } catch (\Exception $e) {
+ \OCP\Util::writeLog('files_sharing', "can't remove share: " . $e->getMessage(), \OCP\Util::WARN);
+ }
}
/**