diff --git a/include/class.http.php b/include/class.http.php
index 632a80b03b230fe8a941be470406cd79e871c8b8..b8205f5c96bc99075b3953b53c11e1ef5cbf97b0 100644
--- a/include/class.http.php
+++ b/include/class.http.php
@@ -106,7 +106,7 @@ class Http {
     }
 
     function download($filename, $type, $data=null, $disposition='attachment') {
-        if (strpos($type, 'image/') !== 0 || preg_match('/image\/.*\+.*/', $type))
+        if (strpos($type, 'image/') !== false && preg_match('/image\/.*\+.*/', $type))
           $disposition='attachment';
 
         header('Pragma: private');