]> source.dussan.org Git - nextcloud-server.git/commitdiff
Map empty mimetypes to octet-stream for Oracle DBMS.
authorAndreas Fischer <bantu@owncloud.com>
Tue, 29 Oct 2013 13:18:42 +0000 (14:18 +0100)
committerAndreas Fischer <bantu@owncloud.com>
Tue, 29 Oct 2013 13:18:42 +0000 (14:18 +0100)
lib/private/files/cache/cache.php

index fc2d965d7f97fff2d273ae2de1f90dcbb701b7f5..c1e5b34c8aad48054cba7cdd9ec469160287646e 100644 (file)
@@ -64,6 +64,10 @@ class Cache {
         * @return int
         */
        public function getMimetypeId($mime) {
+               if (empty($mime)) {
+                       // Can not insert empty string into Oracle NOT NULL column.
+                       $mime = 'application/octet-stream';
+               }
                if (empty(self::$mimetypeIds)) {
                        $this->loadMimetypes();
                }