• Resolved Paul

    (@headwall)


    When running Elementor 4.2.2 on PHP 8.5, we get the following:

    elementor/modules/global-classes/atomic-global-styles.php line 410

    Elementor\Modules\GlobalClasses\Atomic_Global_Styles::get_cache_root_key(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead

    At the moment, we’re patching atomic-global-styles.php to sidestep the output, but can you investigate a proper fix please?

    Thanks

    Paul

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jobtorres

    (@jobtorres)

    Hi Paul,

    My name is Job, Tier 2 Technical Customer Experience Specialist at Elementor. Thank you for reaching out and providing the specific stack trace regarding the PHP notice you observed.Technical Assessment

    The message reported (Implicitly marking parameter $key as nullable is deprecated) is a PHP deprecation warning triggered by stricter type declaration handling in newer PHP environments. Deprecation notices are informational logs designed to notify developers of upcoming language syntax changes; they do not represent a functional failure, bug or a breaking error within the execution flow.

    Our developers are aware of these PHP type-hinting requirements and has an active tracking task to address explicit nullable declarations in alignment with future PHP versions.

    Please note that directly modifying core plugin files (such as atomic-global-styles.php) is not recommended, as any custom changes will be overwritten during subsequent plugin updates and may introduce unexpected environment-related behaviors.

    In production environments, PHP notices and warnings should be suppressed from front-end display to maintain security and prevent layout pollution.

    Workarounds

    1. Revert any manual edits made to atomic-global-styles.php to preserve core integrity.
    2. Access your site files via FTP or your hosting control panel’s File Manager and edit the wp-config.php file.
    3. Add or update the following debugging constants directly above the line that reads /* That's all, stop editing! Happy publishing. */:
    if ( ! defined( 'WP_DEBUG' ) ) {
    define( 'WP_DEBUG', false );
    }
    if ( ! defined( 'WP_DEBUG_DISPLAY' ) ) {
    define( 'WP_DEBUG_DISPLAY', false );
    }

    This configuration ensures that deprecation notices are silenced on the front end while allowing the site to run normally while our development team incorporates these syntax updates in future releases.

    Kind regards,

    Thread Starter Paul

    (@headwall)

    Thanks for the detailed reply.

    The reason we’ve had to patch the source is because we run WP Cron tasks via WP CLI. When hosting several hundred websites, each with a cron task every few minutes, the email noise (from the deprecation warnings) is extreme.

    We’ve patched the last few minor revisions, since we upgraded our fleet to PHP 8.5. It’s a single source file – not too bad.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.