mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG:removed null FormField value. fixes #8088
This commit is contained in:
parent
775567d427
commit
63dbb1c6c9
@ -125,7 +125,7 @@ class FormField extends RequestHandler {
|
|||||||
foreach($attributes as $k => $v) {
|
foreach($attributes as $k => $v) {
|
||||||
// Note: as indicated by the $k == value item here; the decisions over what to include in the attributes
|
// Note: as indicated by the $k == value item here; the decisions over what to include in the attributes
|
||||||
// can sometimes get finicky
|
// can sometimes get finicky
|
||||||
if(!empty($v) || $v === '0' || $k == 'value') {
|
if(!empty($v) || $v === '0' || ($k == 'value' && $v !== null) ) {
|
||||||
$preparedAttributes .= " $k=\"" . Convert::raw2att($v) . "\"";
|
$preparedAttributes .= " $k=\"" . Convert::raw2att($v) . "\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user