summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-08 19:32:51 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-08 19:32:51 +0000
commitcdc796aed46093c50c85910a8acc1cb28f8b4a35 (patch)
treec7c1bfed65d51f0f70b715a2bfb20cefb354e576 /core
parentd1a913892591286f4a3cb6759575c3eb037043a2 (diff)
Don't rely on the file to have an extension (or better: don't throw an
error if we can't find one-- just assume its a photo).
Diffstat (limited to 'core')
-rw-r--r--core/controllers/simple_uploader.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/controllers/simple_uploader.php b/core/controllers/simple_uploader.php
index c369e9f2..13ec1f25 100644
--- a/core/controllers/simple_uploader.php
+++ b/core/controllers/simple_uploader.php
@@ -49,7 +49,8 @@ class Simple_Uploader_Controller extends Controller {
try {
$title = substr(basename($temp_filename), 10); // Skip unique identifier Kohana adds
$path_info = pathinfo($temp_filename);
- if (in_array(strtolower($path_info["extension"]), array("flv", "mp4"))) {
+ if (array_key_exists("extension", $path_info) &&
+ in_array(strtolower($path_info["extension"]), array("flv", "mp4"))) {
$movie = movie::create($album, $temp_filename, $title, $title);
log::success("content", t("Added a movie"),
html::anchor("movies/$movie->id", t("view movie")));