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/Core/WorkFlow/Helper.php +18 -2 3.2.23.3.1 View file →
@@ -88,9 +88,16 @@
88 88 || isset($conditionalActionIds['successMsg'][(string) $msg->id])
89 89 ) {
90 90 continue;
91 91 }
92 - $returnableData = self::replaceFieldWithValue($msg->message_content, $fieldValue, true, null, true);
92 + // Translate before smart-tag replacement (identity when unhooked).
93 + $messageContent = (string) apply_filters(
94 + 'bitform_translate_form_string',
95 + (string) $msg->message_content,
96 + 'msg-content-' . $msg->id,
97 + $formId
98 + );
99 + $returnableData = self::replaceFieldWithValue($messageContent, $fieldValue, true, null, true);
93 100 $messageId = $msg->id;
94 101 if (isset($msgConfig->afterSubmit)) {
95 102 $afterSubmit = $msgConfig->afterSubmit;
96 103 }
@@ -109,8 +116,15 @@
109 116 continue;
110 117 }
111 118 $url = Utilities::jsonObj($redirectPage->integration_details ?? '')->url ?? '';
112 119 if (!empty($url)) {
120 + // Translated before smart-tag replacement: per-language redirect targets.
121 + $url = (string) apply_filters(
122 + 'bitform_translate_form_string',
123 + (string) $url,
124 + 'redirect-url-' . $redirectPage->id,
125 + $formId
126 + );
113 127 $url = self::replaceFieldWithValue($url, $fieldValue);
114 128 }
115 129 $returnableData = empty($url) ? '' : esc_url_raw($url);
116 130 break;
@@ -484,9 +498,11 @@
484 498 return $firstOperand - $secondOperand;
485 499 case '*':
486 500 return $firstOperand * $secondOperand;
487 501 case '/':
488 - return 0 == $secondOperand ? null : $firstOperand / $secondOperand;
502 + // Compare as float, not with `0 ==`: PHP 8 made `0 == ''` false, so a
503 + // non-numeric operand slipped past the old guard into DivisionByZeroError.
504 + return 0.0 === (float) $secondOperand ? null : $firstOperand / $secondOperand;
489 505 case '^':
490 506 return $firstOperand ** $secondOperand;
491 507 }
492 508