Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More explicit fetch mode in Mysql datasource

  • Loading branch information...
commit 850dbb9453f0f9160929eb8bb6dbe98f6eb5f2b6 1 parent 8b7f069
@lorenzo lorenzo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Cake/Model/Datasource/Database/Mysql.php
View
2  lib/Cake/Model/Datasource/Database/Mysql.php
@@ -309,7 +309,7 @@ public function describe($model) {
throw new CakeException(__d('cake_dev', 'Could not describe table for %s', $table));
}
- foreach ($cols as $column) {
+ while ($column = $cols->fetch(PDO::FETCH_OBJ)) {
$fields[$column->Field] = array(
'type' => $this->column($column->Type),
'null' => ($column->Null === 'YES' ? true : false),
Please sign in to comment.
Something went wrong with that request. Please try again.