diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-07 11:06:24 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-07 11:09:18 +0200 |
commit | 6f617bdec7dedf408713b11079d077e919b78abf (patch) | |
tree | b958e5423cdd7f9066df5d66c3b3ec28fbf4e36f | |
parent | 2a0be238bcd5da85642b975f5b243c94d202e5b6 (diff) | |
download | nextcloud-server-6f617bdec7dedf408713b11079d077e919b78abf.tar.gz nextcloud-server-6f617bdec7dedf408713b11079d077e919b78abf.zip |
catch exception if db query execution fails
-rw-r--r-- | apps/files_sharing/lib/updater.php | 6 |
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); + } } /** |