Skip to content
Snippets Groups Projects
Commit 63ab400a authored by Andreas Gohr's avatar Andreas Gohr Committed by GitHub
Browse files

Merge pull request #1832 from splitbrain/fixStrictWarnings

Fix strict standard warnings in dropdowns for PHP <=5.6
parents 9c5f3115 7b6bf7a3
No related branches found
No related tags found
No related merge requests found
......@@ -142,12 +142,14 @@ class DropdownElement extends InputElement {
protected function getFirstOption() {
$options = $this->options();
if (!empty($options)) {
return (string) array_shift(array_keys($options));
$keys = array_keys($options);
return (string) array_shift($keys);
}
foreach ($this->optGroups as $optGroup) {
$options = $optGroup->options();
if (!empty($options)) {
return (string) array_shift(array_keys($options));
$keys = array_keys($options);
return (string) array_shift($keys);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment