mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Type checking problem in LookupField->Field(), merged in from r62387
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62381 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e76c68eff4
commit
b7a2e4c8f2
@ -13,7 +13,8 @@ class LookupField extends DropdownField {
|
|||||||
* Returns a readonly span containing the correct value.
|
* Returns a readonly span containing the correct value.
|
||||||
*/
|
*/
|
||||||
function Field() {
|
function Field() {
|
||||||
if(trim($this->value)) {
|
|
||||||
|
if(trim($this->value) || $this->value === '0') {
|
||||||
$this->value = trim($this->value);
|
$this->value = trim($this->value);
|
||||||
if(is_array($this->source)) {
|
if(is_array($this->source)) {
|
||||||
$mappedValue = isset($this->source[$this->value]) ? $this->source[$this->value] : null;
|
$mappedValue = isset($this->source[$this->value]) ? $this->source[$this->value] : null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user