]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/File.php
Fixes problem with IRC URLs showing as attachments
[quix0rs-gnu-social.git] / classes / File.php
index 33273bbdccb577047e545f77504da008cd31fd35..c9477f5f1eeb802474d2a2ad4781fa43e7ec0dfd 100644 (file)
@@ -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);