Check result only once
This commit is contained in:
parent
ef65037211
commit
8da1aac1d0
1 changed files with 5 additions and 3 deletions
8
lib/private/files/cache/cache.php
vendored
8
lib/private/files/cache/cache.php
vendored
|
@ -87,9 +87,11 @@ class Cache {
|
|||
|
||||
protected function loadMimetypes(){
|
||||
$result = \OC_DB::executeAudited('SELECT `id`, `mimetype` FROM `*PREFIX*mimetypes`', array());
|
||||
while ($result && $row = $result->fetchRow()) {
|
||||
self::$mimetypeIds[$row['mimetype']] = $row['id'];
|
||||
self::$mimetypes[$row['id']] = $row['mimetype'];
|
||||
if ($result) {
|
||||
while ($row = $result->fetchRow()) {
|
||||
self::$mimetypeIds[$row['mimetype']] = $row['id'];
|
||||
self::$mimetypes[$row['id']] = $row['mimetype'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue