• Hello,

    When installing on a new site with PHP 8.4 I got those errors:

    Deprecated: Freemius::maybe_activate_bundle_license(): Implicitly marking parameter $license as nullable is deprecated, the explicit nullable type must be used instead in?/…/wp-content/plugins/error-log-monitor/freemius/includes/class-freemius.php?on line?7780

    Deprecated: Freemius::set_license(): Implicitly marking parameter $license as nullable is deprecated, the explicit nullable type must be used instead in?/…/wp-content/plugins/error-log-monitor/freemius/includes/class-freemius.php?on line?12388

    Deprecated: Freemius::switch_to_blog(): Implicitly marking parameter $install as nullable is deprecated, the explicit nullable type must be used instead in?/…/wp-content/plugins/error-log-monitor/freemius/includes/class-freemius.php?on line?15633

    Deprecated: Freemius::_activate_addon_account(): Implicitly marking parameter $bundle_license as nullable is deprecated, the explicit nullable type must be used instead in?/…/wp-content/plugins/error-log-monitor/freemius/includes/class-freemius.php?on line?18112

    Deprecated: Freemius::_store_site(): Implicitly marking parameter $site as nullable is deprecated, the explicit nullable type must be used instead in?/…/wp-content/plugins/error-log-monitor/freemius/includes/class-freemius.php?on line?19711

    Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in?/…/wp-admin/admin-header.php?on line?36

    Anything I can do? Please note that everything still works fine. It’s just that the log file gets flooded.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    This is a tricky one since all those deprecation notices are triggered in a third-party library that this plugin uses: Freemius SDK. The problem has been reported to the author(s) of that library, but I suspect it’s not easy for them to fix because the proper solution would require raising PHP version requirements from PHP 5.6 to at least PHP 7.1. While that change would be fine for Error Log Monitor, it would still be a backwards compatibility break that could affect other users and developers.

    Unfortunately, I don’t think there’s currently an easy way to fix those deprecation notices. However, as you noticed, they shouldn’t break anything; they just take up space in the log.

    Thread Starter John

    (@dsl225)

    Many thanks for your feedback.

    This is a shame because we are asked from all developers to update to PHP 8.xx and when we test nothing works… I have a bunch of sites still running fine on PHP 7.4 and I see less and less reasons to do so as about 1/3 of installed plugins generate huge amounts of deprecation errors that heavily flood the error logs and makes them unreadable when something goes wrong.

    I contacted other plugin developers and most say, yes no problem if the site still works fine as those are just deprecations… I now understand why so many people still stick with PHP 7.4!

    Thanks anyway.

    Plugin Author Janis Elsts

    (@whiteshadow)

    For what it’s worth, as a developer, I would be happy to upgrade all my code to PHP 8.x and drop support for older PHP versions. However, the WordPress PHP version stats show that about 40% of users are still on those older versions, and less than 10% use an actively supported PHP version (currently that’s PHP 8.3 or 8.4). Perhaps it’s a chicken-and-egg problem, in a way.

    In many cases, there’s a way to make the same code work without errors both in old and new PHP versions. This is unfortunately one of the exceptions. The gap between PHP 5.6 (2014) and PHP 8.4 (2024) might just be too large.

    Thread Starter John

    (@dsl225)

    Yes, I see. That’s why we get this 10%.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.