diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-05 14:18:34 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-05 14:18:34 +0000 |
commit | 0cd8606e818d5ca0f0cd9e3f8b4cd0901c08521e (patch) | |
tree | dc51e657f886221cb40df5864a547feb1f8aac38 | |
parent | 5b3ebee581cb3c94f0f5e1109b36837bb28b0c66 (diff) | |
download | elgg-0cd8606e818d5ca0f0cd9e3f8b4cd0901c08521e.tar.gz elgg-0cd8606e818d5ca0f0cd9e3f8b4cd0901c08521e.tar.bz2 |
Actually fixes #202
git-svn-id: https://code.elgg.org/elgg/trunk@1706 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/entities.php | 8 |
1 files changed, 4 insertions, 4 deletions
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; } } |