summaryrefslogtreecommitdiff
path: root/classes/File.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/File.php')
-rw-r--r--classes/File.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/File.php b/classes/File.php
index 33273bbdc..c9477f5f1 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -286,7 +286,9 @@ class File extends Memcached_DataObject
if(! isset($this->filename)){
$notEnclosureMimeTypes = array(null,'text/html','application/xhtml+xml');
- $mimetype = strtolower($this->mimetype);
+ if($mimetype != null){
+ $mimetype = strtolower($this->mimetype);
+ }
$semicolon = strpos($mimetype,';');
if($semicolon){
$mimetype = substr($mimetype,0,$semicolon);