diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-08-07 17:17:30 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-08-07 17:17:30 +0200 |
commit | a0243e03effc1a1a60a80c3b95f9499bbd0b661f (patch) | |
tree | 78335c27392ce6620b022c1336e739a8a81813bf /lib | |
parent | 1c1ede57034343830696667820115435db5509ba (diff) | |
download | nextcloud-server-a0243e03effc1a1a60a80c3b95f9499bbd0b661f.tar.gz nextcloud-server-a0243e03effc1a1a60a80c3b95f9499bbd0b661f.zip |
use ===
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/type/detection.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/files/type/detection.php b/lib/files/type/detection.php index 1fe49a9bc46..242a81cb5a4 100644 --- a/lib/files/type/detection.php +++ b/lib/files/type/detection.php @@ -61,7 +61,7 @@ class Detection { * @return string */ public function detect($path) { - $isWrapped = (strpos($path, '://') !== false) and (substr($path, 0, 7) == 'file://'); + $isWrapped = (strpos($path, '://') !== false) and (substr($path, 0, 7) === 'file://'); if (@is_dir($path)) { // directories are easy @@ -70,7 +70,7 @@ class Detection { $mimeType = $this->detectPath($path); - if ($mimeType == 'application/octet-stream' and function_exists('finfo_open') + if ($mimeType === 'application/octet-stream' and function_exists('finfo_open') and function_exists('finfo_file') and $finfo = finfo_open(FILEINFO_MIME) ) { $info = @strtolower(finfo_file($finfo, $path)); @@ -79,11 +79,11 @@ class Detection { } finfo_close($finfo); } - if (!$isWrapped and $mimeType == 'application/octet-stream' && function_exists("mime_content_type")) { + if (!$isWrapped and $mimeType === 'application/octet-stream' && function_exists("mime_content_type")) { // use mime magic extension if available $mimeType = mime_content_type($path); } - if (!$isWrapped and $mimeType == 'application/octet-stream' && \OC_Helper::canExecute("file")) { + if (!$isWrapped and $mimeType === 'application/octet-stream' && \OC_Helper::canExecute("file")) { // it looks like we have a 'file' command, // lets see if it does have mime support $path = escapeshellarg($path); |