diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module
index 25a4b0e585416effac0a2d24d2930ddfc8c03bdd..d6e20ff36c5785cf5515f54d709d9e1f9e02ac11 100644
--- a/core/modules/dblog/dblog.module
+++ b/core/modules/dblog/dblog.module
@@ -87,14 +87,8 @@ function dblog_cron() {
  *   List of uniquely defined database log message types.
  */
 function _dblog_get_message_types() {
-  $types = array();
-
-  $result = db_query('SELECT DISTINCT(type) FROM {watchdog} ORDER BY type');
-  foreach ($result as $object) {
-    $types[] = $object->type;
-  }
-
-  return array_combine($types, $types);
+  return db_query('SELECT DISTINCT(type) FROM {watchdog} ORDER BY type')
+    ->fetchAllKeyed(0, 0);
 }
 
 /**