X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;f=ItemAddEmbedVideo.inc;h=3a1fa7967e7cda4195a2e7fb54057d346917c8a5;hb=c715f7d9dc80bca025984c9150c02ccc4bbdce80;hp=81b5951486c1d97f4002c382bfdcbd0c8eef924e;hpb=4a4f36d3d395d88a19c33a457ec1daeec54cbeb8;p=embedvideo%2F.git diff --git a/ItemAddEmbedVideo.inc b/ItemAddEmbedVideo.inc index 81b5951..3a1fa79 100644 --- a/ItemAddEmbedVideo.inc +++ b/ItemAddEmbedVideo.inc @@ -257,7 +257,8 @@ class ItemAddEmbedVideo extends ItemAddPlugin { } /* Extract the summary from the webpage contents */ - preg_match('//i', + //print "contents: $contents
"; + preg_match('//i', $contents, $matches); $summary=$matches[1]; @@ -624,6 +625,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); + 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;