From 2b02c1df3e004e270301fa8c630949bc557b0ee9 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 17 Mar 2011 11:07:22 +0000 Subject: Fixes #3098 catching exceptions when loading an object in system log git-svn-id: http://code.elgg.org/elgg/trunk@8751 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/system_log.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php index 21e119b7c..61b386353 100644 --- a/engine/lib/system_log.php +++ b/engine/lib/system_log.php @@ -128,7 +128,12 @@ function get_object_from_log_entry($entry_id) { if ($entry) { $class = $entry->object_class; - $object = new $class($entry->object_id); + // surround with try/catch because object could be disabled + try { + $object = new $class($entry->object_id); + } catch (Exception $e) { + + } if ($object) { return $object; } -- cgit v1.2.3