Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #4569867
TheGem Elements Counter widget – PHP 8.3 compatibility bug
Closed

Comments

  •  1
    Gergő Győri started the conversation

    Hi,

    I found a PHP 8.3 compatibility issue in the TheGem Elements Counter widget.

    File: wp-content/plugins/thegem-elements-elementor/inc/elementor/widgets/counter/widget.php

    Line 184:

    ###b class="inline-flex items-center justify-center relative isolate shrink-0 can-focus select-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none disabled:drop-shadow-none border-transparent transition font-base duration-300 ease-[cubic-bezier(0.165,0.85,0.45,1)] h-8 w-8 rounded-md backdrop-blur-md _fill_10ocf_9 _ghost_10ocf_96" type="button" aria-label="Copy to clipboard" data-state="closed"###

    php

    $arr_teams_person[$p->ID] = get_post_meta($p->ID, 'thegem_team_person_data')[0]['name'];

    This throws a fatal error on PHP 8.3:

    ###b class="inline-flex items-center justify-center relative isolate shrink-0 can-focus select-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none disabled:drop-shadow-none border-transparent transition font-base duration-300 ease-[cubic-bezier(0.165,0.85,0.45,1)] h-8 w-8 rounded-md backdrop-blur-md _fill_10ocf_9 _ghost_10ocf_96" type="button" aria-label="Copy to clipboard" data-state="closed"###

    PHP Warning: Trying to access array offset on false

    Fix:

    ###b class="inline-flex items-center justify-center relative isolate shrink-0 can-focus select-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none disabled:drop-shadow-none border-transparent transition font-base duration-300 ease-[cubic-bezier(0.165,0.85,0.45,1)] h-8 w-8 rounded-md backdrop-blur-md _fill_10ocf_9 _ghost_10ocf_96" type="button" aria-label="Copy to clipboard" data-state="closed"###

    php

    $arr_teams_person[$p->ID] = get_post_meta($p->ID, 'thegem_team_person_data')[0]['name'] ?? '';

    This causes Elementor editor to return a 500 Internal Server Error on PHP 8.3 + WordPress 7.0.

    Please include this fix in the next update.

    Environment:

    • PHP: 8.3
    • WordPress: 7.0
    • Elementor: 4.1.1
    • TheGem Elements: 5.12.1.1

    Thanks

  •  451
    Sergio replied

    Hi,

    We have fixed the code as follows:

    $arr_teams_person[$p->ID] = get_the_title($p->ID) . ' (ID = ' . $p->ID . ')';

    The fix will be available in the next update.

    If you’re happy with our theme, please rate us with 5 stars on Themeforest. It keeps us motivated!  (How to rate).

    Regards Sergio Codex.

  •  1
    Gergő Győri replied

    Thank you!