mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
catch exception if db query execution fails
This commit is contained in:
parent
4f67b7a6c3
commit
288f01bf62
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue