Fix creating the return structure for selectAssoc() in non-pdo drivers
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 24 Dec 2010 17:52:48 +0000 (12:52 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 24 Dec 2010 17:52:48 +0000 (12:52 -0500)
Fixes Bug: 9378

framework/Db/lib/Horde/Db/Adapter/Base.php

index f16b0fd..ce12ef9 100644 (file)
@@ -498,7 +498,7 @@ abstract class Horde_Db_Adapter_Base implements Horde_Db_Adapter
         $result = $this->selectAll($sql, $arg1, $arg2);
         $values = array();
         foreach ($result as $row) {
-            $values[next($row)] = next($row);
+            $values[current($row)] = next($row);
         }
         return $values;
     }