aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-12-04 22:48:47 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-12-04 22:48:47 +0000
commit2ec34ab24b4ec17fe28521de36bade6a5fb350a1 (patch)
tree0cb0f9ed85b024077f7c1be64247ec0645c89feb /engine
parent0d252393cb42b48bffa30f0c02658a3f9b928550 (diff)
downloadelgg-2ec34ab24b4ec17fe28521de36bade6a5fb350a1.tar.gz
elgg-2ec34ab24b4ec17fe28521de36bade6a5fb350a1.tar.bz2
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
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/access.php6
1 files changed, 4 insertions, 2 deletions
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;
}