projects
/
embedvideo
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4a4f36d
)
Added error check for thumbnail dimension retrieval
author
Alan Jack Pippin
<ajp@pippin.(none)>
Fri, 31 Aug 2007 02:43:59 +0000
(20:43 -0600)
committer
Alan J. Pippin
<ajp@pippins.net>
Fri, 31 Aug 2007 02:43:59 +0000
(20:43 -0600)
ItemAddEmbedVideo.inc
patch
|
blob
|
history
diff --git
a/ItemAddEmbedVideo.inc
b/ItemAddEmbedVideo.inc
index 81b5951486c1d97f4002c382bfdcbd0c8eef924e..940a4ea1e5256c4e7d22852fa515969f1614b470 100644
(file)
--- a/
ItemAddEmbedVideo.inc
+++ b/
ItemAddEmbedVideo.inc
@@
-624,6
+624,10
@@
class ItemAddEmbedVideo extends ItemAddPlugin {
// Set the thumbnailHeight to the current thumbnailSize
// Set the thumbnailWidth to the appropriate size based on the thumbnailHeight * ratio
$image_data = @getimagesize($tmpFile);
// Set the thumbnailHeight to the current thumbnailSize
// Set the thumbnailWidth to the appropriate size based on the thumbnailHeight * ratio
$image_data = @getimagesize($tmpFile);
+ if(!$image_data) {
+ return array(GalleryCoreApi::error(ERROR_STORAGE_FAILURE,__FILE__,__LINE__,
+ "Unable to retrieve thumbnail dimensions for: $tmpFile"),null,null);
+ }
$ratio = $image_data[0] / $image_data[1];
$debugString.="Using ratio from original thumbnail of $ratio. ";
$thumbnailHeight=$thumbnailSize;
$ratio = $image_data[0] / $image_data[1];
$debugString.="Using ratio from original thumbnail of $ratio. ";
$thumbnailHeight=$thumbnailSize;