PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V3.3.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV3.3.2
V3.3.2 3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 All 139 releases
← All changes | includes/Frontend/Form/View/Theme/Fields/RadioBoxField.php +3 -3 -3.0.1 → V3.3.2 View file →
@@ -21,12 +21,12 @@
21 21 $value = '';
22 22 $radioBoxOptions = '';
23 23 $bfFrontendFormIds = FrontendHelpers::$bfFrontendFormIds;
24 24 $contentCount = count($bfFrontendFormIds);
25 - if (property_exists($field, 'opt') && count($field->opt) > 0) {
25 + if (is_object($field) && property_exists($field, 'opt') && is_countable($field->opt) && count($field->opt) > 0) {
26 26 $defaultValue = isset($field->val) ? $field->val : '';
27 27 foreach ($field->opt as $key => $opt) {
28 - $value = isset($opt->val) ? $opt->val : $opt->lbl;
28 + $value = isset($opt->val) ? $opt->val : ($opt->lbl ?? '');
29 29 $check = '';
30 30 $req = '';
31 31 $lbl = $fieldHelpers->renderHTMR($opt->lbl);
32 32 $disabled = '';
@@ -127,9 +127,9 @@
127 127 }
128 128
129 129 //Other Option
130 130 $otherOptLbl = !empty($field->otherOptLbl) ? $field->otherOptLbl : __('Other...', 'bit-form');
131 - $optCount = property_exists($field, 'opt') ? count($field->opt) : 0;
131 + $optCount = isset($field->opt) && is_countable($field->opt) ? count($field->opt) : 0;
132 132 $inputPh = isset($field->otherInpPh) ? $field->otherInpPh : $otherOptLbl;
133 133 $inpReq = isset($field->valid->otherOptReq) ? ($field->valid->otherOptReq ? 'required' : '') : '';
134 134 if (property_exists($field, 'addOtherOpt') && $field->addOtherOpt) {
135 135 $check = $check ?? '';