diff options
author | Mario <mario@mariovavti.com> | 2020-01-12 09:18:07 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-01-12 09:18:07 +0000 |
commit | 8cb968c4b03e5d5462edec56f31625e9f15a6a15 (patch) | |
tree | ccd1974ee57d17492a25846b2e4fae28b97c1e2f /vendor/sabre/dav/lib/DAV/Browser | |
parent | f645c6f3a57bf5f53bbb2bde362b2447f725c977 (diff) | |
download | volse-hubzilla-8cb968c4b03e5d5462edec56f31625e9f15a6a15.tar.gz volse-hubzilla-8cb968c4b03e5d5462edec56f31625e9f15a6a15.tar.bz2 volse-hubzilla-8cb968c4b03e5d5462edec56f31625e9f15a6a15.zip |
composer update sabre/dav
Diffstat (limited to 'vendor/sabre/dav/lib/DAV/Browser')
-rw-r--r-- | vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php b/vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php index 7466babb3..b07103db9 100644 --- a/vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php +++ b/vendor/sabre/dav/lib/DAV/Browser/GuessContentType.php @@ -85,10 +85,12 @@ class GuessContentType extends DAV\ServerPlugin */ protected function getContentType($fileName) { - // Just grabbing the extension - $extension = strtolower(substr($fileName, strrpos($fileName, '.') + 1)); - if (isset($this->extensionMap[$extension])) { - return $this->extensionMap[$extension]; + if (null !== $fileName) { + // Just grabbing the extension + $extension = strtolower(substr($fileName, strrpos($fileName, '.') + 1)); + if (isset($this->extensionMap[$extension])) { + return $this->extensionMap[$extension]; + } } return 'application/octet-stream'; |