summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-01-09 02:31:59 +0100
committerLukas Reschke <lukas@owncloud.com>2015-01-09 02:31:59 +0100
commit199276bcbb820df518298d2d98c9b00711c1be38 (patch)
treed378d09d0387159f6281c183d69c8a9bba00b9de /apps/files/ajax
parent6a5f12beca175a0b9a951fa844eacfd21a8df3de (diff)
downloadnextcloud-server-199276bcbb820df518298d2d98c9b00711c1be38.tar.gz
nextcloud-server-199276bcbb820df518298d2d98c9b00711c1be38.zip
Verify existence of $_GET key
Otherwise when the file without any specified mimetype was accessed the error log was flooded with entries such as "Undefined index: mime", there can be multiple issues found about this in the forum and our bugtracker. To test this access `/index.php/apps/files/ajax/mimeicon.php` with and without `$_GET['mime']`. Fixes itself.
Diffstat (limited to 'apps/files/ajax')
-rw-r--r--apps/files/ajax/mimeicon.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/ajax/mimeicon.php b/apps/files/ajax/mimeicon.php
index fdbcc441a78..c531f5a3e81 100644
--- a/apps/files/ajax/mimeicon.php
+++ b/apps/files/ajax/mimeicon.php
@@ -1,4 +1,6 @@
<?php
\OC::$server->getSession()->close();
-print OC_Helper::mimetypeIcon($_GET['mime']);
+$mime = isset($_GET['mime']) ? $_GET['mime'] : '';
+
+print OC_Helper::mimetypeIcon($mime);