PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
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 2.10.1 All 138 releases
← All changes | includes/Frontend/Form/View/Theme/Fields/CheckBoxField.php +2 -2 3.1.03.3.1 View file →
@@ -22,9 +22,9 @@
22 22 $checkBoxOptions = '';
23 23 $bfFrontendFormIds = FrontendHelpers::$bfFrontendFormIds;
24 24 $contentCount = count($bfFrontendFormIds);
25 25
26 - if (property_exists($field, 'opt') && count($field->opt) > 0) {
26 + if (is_object($field) && property_exists($field, 'opt') && is_countable($field->opt) && count($field->opt) > 0) {
27 27 if (isset($field->val) && false !== strpos($field->val, BITFORMS_BF_SEPARATOR)) {
28 28 $defaultValues = explode(BITFORMS_BF_SEPARATOR, $field->val);
29 29 } else {
30 30 $defaultValues = isset($field->val) ? explode(',', $field->val) : [];
@@ -95,9 +95,9 @@
95 95 }
96 96 }
97 97
98 98 //Other Option
99 - $optCount = property_exists($field, 'opt') ? count($field->opt) : 0;
99 + $optCount = isset($field->opt) && is_countable($field->opt) ? count($field->opt) : 0;
100 100 $inpReq = isset($field->valid->otherOptReq) ? ($field->valid->otherOptReq ? 'required' : '') : '';
101 101 $otherOptLbl = !empty($field->otherOptLbl) ? $field->otherOptLbl : __('Other...', 'bit-form');
102 102 $inputPh = isset($field->otherInpPh) ? "placeholder='{$fieldHelpers->esc_attr($field->otherInpPh)}'" : "placeholder='{$otherOptLbl}'";
103 103 if (property_exists($field, 'addOtherOpt') && $field->addOtherOpt) {