server/apps/files/ajax/mimeicon.php
Lukas Reschke 199276bcbb 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.
2015-01-09 02:31:59 +01:00

6 lines
134 B
PHP

<?php
\OC::$server->getSession()->close();
$mime = isset($_GET['mime']) ? $_GET['mime'] : '';
print OC_Helper::mimetypeIcon($mime);