From 2ec34ab24b4ec17fe28521de36bade6a5fb350a1 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 4 Dec 2008 22:48:47 +0000 Subject: Closes #421 : Catches the DB Exception, so hopefully this will prevent the error from showing up in the future :) git-svn-id: https://code.elgg.org/elgg/trunk@2505 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/access.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engine/lib/access.php') diff --git a/engine/lib/access.php b/engine/lib/access.php index 28584feeb..a47cefd22 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -326,8 +326,10 @@ if ((array_key_exists($collection_id, $collections) || $collection->owner_guid == 0) && $user = get_user($user_guid)) { - global $CONFIG; - insert_data("insert into {$CONFIG->dbprefix}access_collection_membership set access_collection_id = {$collection_id}, user_guid = {$user_guid}"); + global $CONFIG; + try { + insert_data("insert into {$CONFIG->dbprefix}access_collection_membership set access_collection_id = {$collection_id}, user_guid = {$user_guid}"); + } catch (DatabaseException $e) {} return true; } -- cgit v1.2.3