| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FireBox |
| 4 | - * @version 3.1.8 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 |
| @@ -481,10 +481,14 @@ | ||
| 481 | 481 | 'transition.bounceLeftOut' => 'bounceOutLeft', |
| 482 | 482 | 'transition.bounceRightOut' => 'bounceOutRight', |
| 483 | 483 | ], $fade_animations, $slide_animations); |
| 484 | 484 | |
| 485 | - $new_meta[$key] = array_key_exists($new_meta[$key], $animation_map) ? $animation_map[$new_meta[$key]] : $new_meta[$key]; | |
| 485 | + // A campaign with no animation stored leaves this null, and PHP 8.5 deprecates | |
| 486 | + // null as an array_key_exists() key. An empty key misses the map just as null did. | |
| 487 | + $current_animation = is_scalar($new_meta[$key]) ? (string) $new_meta[$key] : ''; | |
| 486 | 488 | |
| 489 | + $new_meta[$key] = array_key_exists($current_animation, $animation_map) ? $animation_map[$current_animation] : $new_meta[$key]; | |
| 490 | + | |
| 487 | 491 | // Validate page slide animation in/out |
| 488 | 492 | if (isset($new_meta['mode']) && $new_meta['mode'] === 'pageslide') |
| 489 | 493 | { |
| 490 | 494 | $isFadeAnimation = in_array($new_meta[$key], $fade_animations); |
| @@ -516,14 +520,14 @@ | ||
| 516 | 520 | * @return void |
| 517 | 521 | */ |
| 518 | 522 | public function migrateShadow($key, &$new_meta, $valueExistsInNewMeta) |
| 519 | 523 | { |
| 520 | - if ($valueExistsInNewMeta) | |
| 524 | + if ($valueExistsInNewMeta || !isset($new_meta[$key])) | |
| 521 | 525 | { |
| 522 | 526 | return; |
| 523 | 527 | } |
| 524 | 528 | |
| 525 | - $new_meta[$key] = isset($new_meta[$key]) && $new_meta[$key] != '0'; | |
| 529 | + $new_meta[$key] = $new_meta[$key] != '0'; | |
| 526 | 530 | } |
| 527 | 531 | |
| 528 | 532 | /** |
| 529 | 533 | * Migrate floating button message settings |
| @@ -560,15 +564,14 @@ | ||
| 560 | 564 | * @return void |
| 561 | 565 | */ |
| 562 | 566 | public function migrateOverlayEnabled($key, &$new_meta, $valueExistsInNewMeta) |
| 563 | 567 | { |
| 564 | - if ($valueExistsInNewMeta) | |
| 568 | + if ($valueExistsInNewMeta || !isset($new_meta[$key])) | |
| 565 | 569 | { |
| 566 | 570 | return; |
| 567 | 571 | } |
| 568 | 572 | |
| 569 | - $overlay = isset($new_meta[$key]) ? (int) $new_meta[$key] : 0; | |
| 570 | - $new_meta[$key] = $overlay == 1; | |
| 573 | + $new_meta[$key] = ((int) $new_meta[$key]) == 1; | |
| 571 | 574 | } |
| 572 | 575 | |
| 573 | 576 | /** |
| 574 | 577 | * Migrate overlay click setting |
| @@ -579,14 +582,14 @@ | ||
| 579 | 582 | * @return void |
| 580 | 583 | */ |
| 581 | 584 | public function migrateOverlayClick($key, &$new_meta, $valueExistsInNewMeta) |
| 582 | 585 | { |
| 583 | - if ($valueExistsInNewMeta) | |
| 586 | + if ($valueExistsInNewMeta || !isset($new_meta[$key])) | |
| 584 | 587 | { |
| 585 | 588 | return; |
| 586 | 589 | } |
| 587 | 590 | |
| 588 | - $overlayClick = isset($new_meta[$key]) ? (int) $new_meta[$key] : 0; | |
| 591 | + $overlayClick = (int) $new_meta[$key]; | |
| 589 | 592 | $new_meta[$key] = !empty($overlayClick) && $overlayClick != 0; |
| 590 | 593 | } |
| 591 | 594 | |
| 592 | 595 | /** |
| @@ -691,9 +694,9 @@ | ||
| 691 | 694 | * @return void |
| 692 | 695 | */ |
| 693 | 696 | public function migrateFiringFrequencyToggle($key, &$new_meta, $valueExistsInNewMeta) |
| 694 | 697 | { |
| 695 | - if ($valueExistsInNewMeta) | |
| 698 | + if ($valueExistsInNewMeta || !isset($new_meta[$key])) | |
| 696 | 699 | { |
| 697 | 700 | return; |
| 698 | 701 | } |
| 699 | 702 | |