From 76890405687824b92a66ee70b69ab1998399cec3 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 26 Jan 2009 14:46:59 -0500 Subject: [PATCH] Use getAssoc() here. --- content/lib/Types/Manager.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/lib/Types/Manager.php b/content/lib/Types/Manager.php index 62b4bc875..c34d76684 100644 --- a/content/lib/Types/Manager.php +++ b/content/lib/Types/Manager.php @@ -72,10 +72,10 @@ class Content_Types_Manager // Get the ids for any types that already exist. if (count($typeName)) { - foreach ($this->_db->selectAll('SELECT type_id, type_name FROM ' . $this->_t('types') . ' WHERE type_name IN ('.implode(',', array_map(array($this->_db, 'quote'), array_keys($typeName))).')') as $row) { - $typeIndex = $typeName[$row['type_name']]; - unset($typeName[$row['type_name']]); - $typeIds[$typeIndex] = (int)$row['type_id']; + foreach ($this->_db->selectAssoc('SELECT type_id, type_name FROM ' . $this->_t('types') . ' WHERE type_name IN ('.implode(',', array_map(array($this->_db, 'quote'), array_keys($typeName))).')') as $id => $type) { + $typeIndex = $typeName[$type]; + unset($typeName[$type]); + $typeIds[$typeIndex] = (int)$id; } } -- 2.11.0