From 0cd8606e818d5ca0f0cd9e3f8b4cd0901c08521e Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 5 Aug 2008 14:18:34 +0000 Subject: Actually fixes #202 git-svn-id: https://code.elgg.org/elgg/trunk@1706 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 198889311..02c6e5d41 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1708,7 +1708,7 @@ // Step one, see if anyone knows how to render this in the current view $url = trigger_plugin_hook('entity:icon:url', $type, array('entity' => $entity, 'viewtype' => $viewtype, 'size' => $size), $url); - if (!file_exists($url)) + if(!@getimagesize($url)) $url = false; // If not exist then don't use the url // Fail, so use default @@ -1809,12 +1809,12 @@ $url = $CONFIG->url . "views/$viewtype/graphics/icons/$type/$subtype/$size.png"; - if (!file_exists($url)) + if(!@getimagesize($url)) $url = $CONFIG->url . "views/$viewtype/graphics/icons/$type/default/$size.png"; - if (!file_exists($url)) + if(!@getimagesize($url)) $url = $CONFIG->url . "views/$viewtype/graphics/icons/default/$size.png"; - + return $url; } } -- cgit v1.2.3