• YaronE

    (@yaron_elh)


    Wanted to know if the plugging is compatible with PHP 8+, what’s its maximum compatible version?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter YaronE

    (@yaron_elh)

    Just a bit more information. I’m asking because I encountered the same issue described here

    https://www.ads-software.com/support/topic/php-warning-of-creating-license/

    but the previous person that pointed out the issue did not describe it in details so let me add additional information

    For me it’s this warning
    PHP Warning: Undefined array key "item_reference" in /path/to/slm-api-listener.php on line 118

    Why it’s appearing
    In PHP 7.4 and earlier, accessing an undefined array key would generate an E_NOTICE level error, which is often suppressed or ignored in production environments.

    In PHP 8+, this behavior has changed:
    PHP 8+ Behavior: Accessing an undefined array key now generates an E_WARNING level error.

    That’s why the error appears for anybody switching to PHP 8+, in my case 8.2 (unless errors are disabled somewhere in the flow)

    for example
    $fields['item_reference'] = trim( sanitize_text_field( $_REQUEST['item_reference'] ) );

    the code attempts to access $_REQUEST without checking if the key exists in the $_REQUEST array. If this key is not present in the request (it’s an optional parameter), PHP 8 we’ll raise that warning

    To temporarily solve this issue, I switched off display_errors = Off in php.ini


    • This reply was modified 1 month ago by YaronE.
    Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us and sharing your findings. I have submitted a message to the developers to investigate further your findings.

    Kind regards.

    Plugin Author mra13

    (@mra13)

    The new update that we have just released should solve this issue.

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