PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.9.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.9.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 2.10.2 All 137 releases
← All changes | includes/Core/WorkFlow/ConditionalLogic.php +18 -17 3.2.12.9.1 View file →
@@ -43,12 +43,10 @@
43 43 public function isBetween()
44 44 {
45 45 $fldValue = $this->_data[$this->_workflow_condition->field]['value'];
46 46 $actionsValue = json_decode($this->_workflow_condition->val);
47 - if (is_object($actionsValue)) {
48 - $min = empty($actionsValue->min) ? '' : $actionsValue->min;
49 - $max = empty($actionsValue->max) ? '' : $actionsValue->max;
50 - return $fldValue >= $min && $fldValue <= $max;
47 + if (is_object($actionsValue) && (!empty($actionsValue->min) && !empty($actionsValue->max))) {
48 + return $fldValue >= $actionsValue->min && $fldValue <= $actionsValue->max;
51 49 }
52 50 return false;
53 51 }
54 52
@@ -263,9 +261,9 @@
263 261 'disable' => $fields->{$fieldData[$actionDetail->field]['key']}->valid->disabled = true,
264 262 'readonly' => $fields->{$fieldData[$actionDetail->field]['key']}->valid->readonly = true,
265 263 'show' => self::logicOnFieldActionShow($actionDetail, $fieldData, $fields),
266 264 ];
267 - // return $workFlowReturnable['fields'];
265 + return $workFlowReturnable['fields'];
268 266 }
269 267
270 268 public function getConditionStatus()
271 269 {
@@ -274,8 +272,9 @@
274 272 foreach ($this->_workflow_condition as $sskey => $ssvalue) {
275 273 if (!is_string($ssvalue)) {
276 274 $this->_workflow_condition = $ssvalue;
277 275 $isCondition = $this->getConditionStatus();
276 +
278 277 if (0 === $sskey) {
279 278 $conditionStatus = $isCondition;
280 279 }
281 280
@@ -314,47 +313,49 @@
314 313 }
315 314 switch (strtolower($logic)) {
316 315 case 'equal':
317 316 return self::isEqual();
318 -
317 + break;
319 318 case 'not_equal':
320 319 return self::isNotEqual();
321 -
320 + break;
322 321 case 'null':
323 322 return self::isNull();
324 -
323 + break;
325 324 case 'not_null':
326 325 return self::isNotNull();
327 -
326 + break;
328 327 case 'contain':
329 328 return self::isContain();
330 -
329 + break;
331 330 case 'contain_all':
332 331 return self::isContainAll();
333 -
332 + break;
334 333 case 'not_contain':
335 334 return self::isNotContain();
336 -
335 + break;
337 336 case 'greater':
338 337 return self::isGreaterThenValue();
339 -
338 + break;
340 339 case 'less':
341 340 return self::isLessThenValue();
342 -
341 + break;
343 342 case 'greater_or_equal':
344 343 return self::isGreatertOrEqual();
345 -
344 + break;
346 345 case 'less_or_equal':
347 346 return self::isLessOrEqual();
347 + break;
348 348
349 349 case 'start_with':
350 350 return self::isStarttWithString();
351 -
351 + break;
352 352 case 'end_with':
353 353 return self::isEndWithString();
354 -
354 + break;
355 355 case 'between':
356 356 return self::isBetween();
357 + break;
357 358
358 359 default:
359 360 return false;
360 361 }