From c4dcba1e9160f02a58b87c0a88e7e32718c81e48 Mon Sep 17 00:00:00 2001 From: jgen Date: Thu, 24 Apr 2014 05:37:26 -0400 Subject: [PATCH] Explicitly check for the existence of these properties before attempting to use them. --- core/basethemelet.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/basethemelet.class.php b/core/basethemelet.class.php index 94cfc159..430597b8 100644 --- a/core/basethemelet.class.php +++ b/core/basethemelet.class.php @@ -56,13 +56,13 @@ class BaseThemelet { $custom_classes = ""; if(class_exists("Relationships")){ - if($image->parent_id !== NULL){ $custom_classes .= "shm-thumb-has_parent "; } - if($image->has_children == TRUE){ $custom_classes .= "shm-thumb-has_child "; } + if(property_exists('Image', 'parent_id') && $image->parent_id !== NULL){ $custom_classes .= "shm-thumb-has_parent "; } + if(property_exists('Image', 'has_children') && $image->has_children == TRUE){ $custom_classes .= "shm-thumb-has_child "; } } return "". - "$h_tip". - "\n"; + "$h_tip". + "\n"; }