Missing looping index added. Without index empty rows returned for csv column headers.
diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php
index 1b8fbc9..3f3af2e 100644
--- a/system/database/drivers/pdo/pdo_result.php
+++ b/system/database/drivers/pdo/pdo_result.php
@@ -93,7 +93,7 @@
{
// Might trigger an E_WARNING due to not all subdrivers
// supporting getColumnMeta()
- $field_names[$i] = @$this->result_id->getColumnMeta();
+ $field_names[$i] = @$this->result_id->getColumnMeta($i);
$field_names[$i] = $field_names[$i]['name'];
}