Commit 6847e4f2 authored by Ad Schellevis's avatar Ad Schellevis

(mvc) add __empty__ item to OptionField as placeholder for an empty string

parent 4934ce12
...@@ -59,7 +59,11 @@ class OptionField extends BaseField ...@@ -59,7 +59,11 @@ class OptionField extends BaseField
// copy options to internal structure, make sure we don't copy in array structures // copy options to internal structure, make sure we don't copy in array structures
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
if (!is_array($value)) { if (!is_array($value)) {
$this->internalOptionList[$key] = $value ; if ($key == "__empty__") {
$this->internalOptionList[""] = $value ;
} else {
$this->internalOptionList[$key] = $value ;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment