ArrayDatasource: Store any type of key as a key column's value

fixes #3510
This commit is contained in:
Johannes Meyer 2019-04-16 13:26:48 +02:00
parent a8832517bf
commit db3cc699f7
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ class ArrayDatasource implements Selectable
$result = array();
$skipped = 0;
foreach ($this->data as $key => $row) {
if (is_string($key) && $this->keyColumn !== null && !isset($row->{$this->keyColumn})) {
if ($this->keyColumn !== null && !isset($row->{$this->keyColumn})) {
$row = clone $row; // Make sure that this won't affect the actual data
$row->{$this->keyColumn} = $key;
}