PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 3.1.14
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v3.1.14
3.1.14 3.1.13 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 All 123 releases
← All changes | Inc/Framework/Inc/Base/Field.php +7 -6 3.1.7 → 3.1.14 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2 /**
3 3 * @package FirePlugins Framework
4 - * @version 1.1.146
4 + * @version 1.2.6
5 5 *
6 6 * @author FirePlugins <[email protected]>
7 7 * @link https://www.fireplugins.com
8 8 * @copyright Copyright © 2026 FirePlugins All Rights Reserved
@@ -97,9 +97,10 @@
97 97 $name = $this->prepareName($options);
98 98 }
99 99
100 100 // add [value] to the name of the field if it has units
101 - if (count($options->get('units', [])) && !in_array($options->get('type'), ['Units', 'ResponsiveControl', 'Dimensions']))
101 + // (cast: count() throws a TypeError on non-countables since PHP 8.0)
102 + if (count((array) $options->get('units', [])) && !in_array($options->get('type'), ['Units', 'ResponsiveControl', 'Dimensions']))
102 103 {
103 104 $name .= '[value]';
104 105 }
105 106 $this->options['name'] = $name;
@@ -324,9 +325,9 @@
324 325
325 326 if (!$meta)
326 327 {
327 328 global $post;
328 - $meta = get_post_meta($post->ID, 'fpframework_meta_settings', true);
329 + $meta = $post ? get_post_meta($post->ID, 'fpframework_meta_settings', true) : [];
329 330 }
330 331
331 332 $val = FieldsHelper::findFieldValueInArray($name, $default, $meta);
332 333
@@ -436,9 +437,9 @@
436 437 /**
437 438 * Renders field top
438 439 * Contains the Responsive Controls and the Units
439 440 *
440 - * @return void
441 + * @return string
441 442 */
442 443 public function getFieldTop()
443 444 {
444 445 $options = $this->getOptions();
@@ -488,9 +489,9 @@
488 489
489 490 /**
490 491 * Renders field body
491 492 *
492 - * @return void
493 + * @return string
493 494 */
494 495 public function getFieldBody()
495 496 {
496 497 // determine who will render the field (plugin or framework)
@@ -534,9 +535,9 @@
534 535 * @return array
535 536 */
536 537 public function getOption($option = null)
537 538 {
538 - if (!$option && !is_string($option) && !isset($this->option[$option]))
539 + if (!$option || !is_string($option) || !isset($this->options[$option]))
539 540 {
540 541 return null;
541 542 }
542 543