summaryrefslogtreecommitdiffstats
path: root/lib/private/files/cache
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-10-29 14:18:42 +0100
committerAndreas Fischer <bantu@owncloud.com>2013-10-29 14:18:42 +0100
commitb3e39dd3d9d94ed24d0e3e0845fd78ccb52c841d (patch)
treed271b0bdb9aac443fa5b3774d3de8218325c9bc7 /lib/private/files/cache
parentfa6ae81149974d8becc58903d6c63594ed8b5cb4 (diff)
downloadnextcloud-server-b3e39dd3d9d94ed24d0e3e0845fd78ccb52c841d.tar.gz
nextcloud-server-b3e39dd3d9d94ed24d0e3e0845fd78ccb52c841d.zip
Map empty mimetypes to octet-stream for Oracle DBMS.
Diffstat (limited to 'lib/private/files/cache')
-rw-r--r--lib/private/files/cache/cache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index fc2d965d7f9..c1e5b34c8aa 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -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();
}