@@ -276,10 +276,12 @@ public function staticField($name, $label = null, $value = null, array $options
276
276
{
277
277
$ options = array_merge (['class ' => 'form-control-static ' ], $ options );
278
278
279
- if (is_array ($ value ) and isset ($ value ['html ' ])) {
280
- $ value = $ value ['html ' ];
281
- } else {
282
- $ value = e ($ value );
279
+ if ( ! is_null ($ value )) {
280
+ if (is_array ($ value ) and isset ($ value ['html ' ])) {
281
+ $ value = $ value ['html ' ];
282
+ } else {
283
+ $ value = e ($ value );
284
+ }
283
285
}
284
286
285
287
$ label = $ this ->getLabelTitle ($ label , $ name , $ options );
@@ -795,7 +797,7 @@ protected function getLabelTitle($label, $name, $options)
795
797
return Lang::get ("forms. {$ name }" );
796
798
}
797
799
798
- $ label = $ label ?: str_replace ('_ ' , ' ' , Str::title ($ name ));
800
+ $ label = $ label ?: str_replace ('_ ' , ' ' , Str::title ($ name ));
799
801
800
802
if (isset ($ options ['required ' ])) {
801
803
$ label = sprintf ('%s %s ' , $ label , $ this ->getLabelRequiredMark ());
@@ -1086,6 +1088,7 @@ protected function setErrorBag($errorBag)
1086
1088
$ this ->errorBag = $ errorBag ;
1087
1089
}
1088
1090
1091
+
1089
1092
/**
1090
1093
* Flatten arrayed field names to work with the validator, including removing "[]",
1091
1094
* and converting nested arrays like "foo[bar][baz]" to "foo.bar.baz".
0 commit comments