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
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/Conversational/Fields/CheckBoxField.php +2 -2 V3.0.2 → 3.3.1 View file →
@@ -25,9 +25,9 @@
25 25 $checkBoxOptions = '';
26 26 $bfFrontendFormIds = FrontendHelpers::$bfFrontendFormIds;
27 27 $contentCount = count($bfFrontendFormIds);
28 28
29 - if (property_exists($field, 'opt') && count($field->opt) > 0) {
29 + if (is_object($field) && property_exists($field, 'opt') && is_countable($field->opt) && count($field->opt) > 0) {
30 30 if (isset($field->val) && false !== strpos($field->val, BITFORMS_BF_SEPARATOR)) {
31 31 $defaultValues = explode(BITFORMS_BF_SEPARATOR, $field->val);
32 32 } else {
33 33 $defaultValues = isset($field->val) ? explode(',', $field->val) : [];
@@ -98,9 +98,9 @@
98 98 }
99 99 }
100 100
101 101 //Other Option
102 - $optCount = property_exists($field, 'opt') ? count($field->opt) : 0;
102 + $optCount = isset($field->opt) && is_countable($field->opt) ? count($field->opt) : 0;
103 103 $otherOptLbl = !empty($field->otherOptLbl) ? $field->otherOptLbl : __('Other...', 'bit-form');
104 104 $inputPh = isset($field->otherInpPh) ? "placeholder='{$fieldHelpers->esc_attr($field->otherInpPh)}'" : "placeholder='Other...'";
105 105 $inpReq = isset($field->valid->otherOptReq) ? ($field->valid->otherOptReq ? 'required' : '') : '';
106 106 if (property_exists($field, 'addOtherOpt') && $field->addOtherOpt) {