| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FireBox |
| 4 | - * @version 3.1.7 Free | |
| 4 | + * @version 3.1.14 Free | |
| 5 | 5 | * |
| 6 | 6 | * @author FirePlugins <[email protected]> |
| 7 | 7 | * @link https://www.fireplugins.com |
| 8 | 8 | * @copyright Copyright © 2026 FirePlugins All Rights Reserved |
| @@ -133,9 +133,13 @@ | ||
| 133 | 133 | $animation_duration = $this->box->params->get('animation_duration') ? (float) $this->box->params->get('animation_duration') : 0; |
| 134 | 134 | $style['animation-duration'] = (float) $animation_duration . 's'; |
| 135 | 135 | |
| 136 | 136 | // Border |
| 137 | - $border_width = $this->box->params->get('border.width', 0) ? trim($this->box->params->get('border.width', 0)) : 0; | |
| 137 | + // A truthy but non-scalar width (a Dimensions/ResponsiveControl value is an array) | |
| 138 | + // would reach trim(), which is a TypeError since PHP 8.0. Numeric widths must keep | |
| 139 | + // working, so this checks for scalars rather than only for strings. | |
| 140 | + $border_width_raw = $this->box->params->get('border.width', 0); | |
| 141 | + $border_width = is_scalar($border_width_raw) && $border_width_raw ? trim((string) $border_width_raw) : 0; | |
| 138 | 142 | $border_style = is_string($this->box->params->get('border.style', 0)) ? trim($this->box->params->get('border.style', 0)) : ''; |
| 139 | 143 | $border_color = is_string($this->box->params->get('border.color')) ? trim($this->box->params->get('border.color')) : ''; |
| 140 | 144 | |
| 141 | 145 | if (!empty($border_width) && !empty($border_style) && !empty($border_color)) |