ArrayDatasource: use array_shift in fetchRow() instead of index access

Since associative arrays are supported, the numeric index 0 might not be
the first entry in the result.
This commit is contained in:
Johannes Meyer 2015-05-06 10:10:29 +02:00
parent 7b2ed3bef7
commit cfa9176192
1 changed files with 2 additions and 1 deletions

View File

@ -138,7 +138,8 @@ class ArrayDatasource implements Selectable
if (empty($result)) { if (empty($result)) {
return false; return false;
} }
return $result[0];
return array_shift($result);
} }
/** /**