summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/movie.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-16 19:44:15 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-16 19:47:52 -0700
commitb4ef00c8d4e55fe7db3147da21cb4239fd3c428c (patch)
tree764295fbcf9077a5101618aee030df4c42e64af3 /modules/gallery/helpers/movie.php
parent7ad5e9ee2c6c912932e8c38c992c9b1194c9107a (diff)
Use a placeholder image if ffmpeg is missing instead of throwing an
exception which would get silently swallowed by swfUpload.
Diffstat (limited to 'modules/gallery/helpers/movie.php')
-rw-r--r--modules/gallery/helpers/movie.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php
index 1d1d29d1..28c15d81 100644
--- a/modules/gallery/helpers/movie.php
+++ b/modules/gallery/helpers/movie.php
@@ -53,7 +53,12 @@ class movie_Core {
throw new Exception("@todo NAME_CANNOT_END_IN_PERIOD");
}
- $movie_info = movie::getmoviesize($filename);
+ try {
+ $movie_info = movie::getmoviesize($filename);
+ } catch (Exception $e) {
+ // Assuming this is MISSING_FFMPEG for now
+ $movie_info = getimagesize(MODPATH . "gallery/images/missing_movie.png");
+ }
// Force an extension onto the name
$pi = pathinfo($filename);