diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-06-17 10:44:15 +0800 |
|---|---|---|
| committer | <unostar@danalan.info> | 2009-06-17 13:51:26 +0800 |
| commit | 18a313c454d07011bb9707cf2eb806bcb4f764fb (patch) | |
| tree | 1d56df6b9d6a8ecd3f6d65e17bf40b995cc750ae /modules/gallery/helpers/movie.php | |
| parent | 69296a222378bf968ed66d30ae2b2305ea542ffa (diff) | |
Use a placeholder image if ffmpeg is missing instead of throwing an
exception which would get silently swallowed by swfUpload.
Signed-off-by: <unostar@danalan.info>
Diffstat (limited to 'modules/gallery/helpers/movie.php')
| -rw-r--r-- | modules/gallery/helpers/movie.php | 7 |
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); |
