mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
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:
parent
7b2ed3bef7
commit
cfa9176192
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user