Fix fetching the mimetype id from the query

This commit is contained in:
Joas Schilling 2015-06-09 16:35:11 +02:00
parent 262d7e659d
commit 0235e5edd3
1 changed files with 2 additions and 1 deletions

View File

@ -121,7 +121,8 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep {
}
// get target mimetype id
$mimetypeId = \OC_DB::executeAudited(self::getIdStmt(), array($mimetype));
$result = \OC_DB::executeAudited(self::getIdStmt(), array($mimetype));
$mimetypeId = $result->fetchOne();
// change mimetype for files with x extension
\OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $mimetypeId, '%.' . $extension));