aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-17 11:07:22 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-17 11:07:22 +0000
commit2b02c1df3e004e270301fa8c630949bc557b0ee9 (patch)
treeca4f7868a034129274e8f14363339dc553969179 /engine
parentfafdc36ad1211620d21344737286e7b3174f0ee6 (diff)
downloadelgg-2b02c1df3e004e270301fa8c630949bc557b0ee9.tar.gz
elgg-2b02c1df3e004e270301fa8c630949bc557b0ee9.tar.bz2
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
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/system_log.php7
1 files changed, 6 insertions, 1 deletions
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;
}