]> source.dussan.org Git - nextcloud-server.git/commitdiff
catch exception if db query execution fails
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 7 Oct 2013 09:06:24 +0000 (11:06 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 7 Oct 2013 09:06:24 +0000 (11:06 +0200)
apps/files_sharing/lib/updater.php

index e40cbc17dc15d7b6ba9897c6b49bd87f0f432ddd..08aaa62e252cdb319f95ab27d95607d18646036b 100644 (file)
@@ -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);
+               }
        }
 
        /**