• Resolved jafarsadiqu

    (@jafarsadiqu)


    Hi,

    We are seeing repeated PHP warnings from the Brevo/Mailin plugin in our server logs.

    Plugin/files:
    wp-content/plugins/mailin/inc/sendinblue.php
    wp-content/plugins/mailin/inc/push-api.php

    Exact warnings:
    PHP Warning: Undefined array key “HTTP_HOST” in /wp-content/plugins/mailin/inc/sendinblue.php

    PHP Warning: Undefined array key “REQUEST_METHOD” in /wp-content/plugins/mailin/inc/push-api.php

    Environment:

    • WordPress / WooCommerce site
    • PHP 8.2
    • Standard WordPress/WooCommerce site, not headless

    Could you please confirm if there is an updated version or recommended patch for this issue?

Viewing 1 replies (of 1 total)
  • Plugin Support shreyachawla

    (@shreyachawla)

    Hi,

    Thank you for reaching out and for providing such detailed information about the warnings you’re encountering.

    What’s happening

    The warnings you’re seeing are related to PHP 8.x compatibility. Starting with PHP 8.0, accessing an undefined array key generates a Warning rather than silently returning null as it did in PHP 7.x. In your case, the plugin is accessing $_SERVER['HTTP_HOST'] and $_SERVER['REQUEST_METHOD'] without first checking whether those keys exist, which can happen in certain contexts (e.g., CLI/cron executions where HTTP server variables are not set).

    The good news is these are non-fatal warnings and do not affect the functionality of your site for regular web traffic.

    Recommended action: Update the plugin

    We recommend updating to the latest available version of the Brevo plugin (v3.3.4), which includes PHP compatibility fixes. You can do this directly from your WordPress dashboard.

    Version 3.2.5 specifically included “technical improvements related to PHP 8 warnings,” and subsequent versions have continued PHP compatibility improvements.

    If the warnings persist after updating

    If you continue to see these specific warnings after updating to v3.3.4, a temporary workaround is to suppress PHP warnings at the log level, or to configure your PHP error reporting to exclude E_WARNING for this plugin path. However, we would strongly recommend reporting the issue so it can be reviewed and patched properly.

    If the warnings remain present on the latest version, please let us know and we will guide you further.

    We apologize for any inconvenience this has caused and appreciate you flagging it so clearly.

    Best regards,

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.