• Resolved Abigailm

    (@abigailm)


    I’m testing PHP 8.0 on some of my sites for debugging purposes. With PHP 8.0, the QPP plugin is throwing off a lot of “PHP Warning” errors — these are non-fatal errors so they wouldn’t impair function, but should be cleaned up. Here are the errors I saw:

    [25-Apr-2021 06:38:31 UTC] PHP Warning:  Array to string conversion in /wp-content/plugins/quick-paypal-payments-premium/legacy/quick-paypal-payments.php on line 1129
    [25-Apr-2021 06:38:31 UTC] PHP Warning:  Undefined array key "firstname" in /wp-content/plugins/quick-paypal-payments-premium/legacy/quick-paypal-payments.php on line 1385
    [25-Apr-2021 06:38:31 UTC] PHP Warning:  Undefined array key "firstname" in /wp-content/plugins/quick-paypal-payments-premium/legacy/quick-paypal-payments.php on line 1386
    [25-Apr-2021 06:38:31 UTC] PHP Warning:  Undefined array key "lastname" in /wp-content/plugins/quick-paypal-payments-premium/legacy/quick-paypal-payments.php on line 1385
    [25-Apr-2021 06:38:31 UTC] PHP Warning:  Undefined array key "lastname" in /wp-content/plugins/quick-paypal-payments-premium/legacy/quick-paypal-payments.php on line 1386
    [25-Apr-2021 06:38:31 UTC] PHP Warning:  Undefined array key "email" in /wp-content/plugins/quick-paypal-payments-premium/legacy/quick-paypal-payments.php on line 1385
    [25-Apr-2021 06:38:31 UTC] PHP Warning:  Undefined array key "email" in /wp-content/plugins/quick-paypal-payments-premium/legacy/quick-paypal-payments.php on line 1386
    [25-Apr-2021 06:38:31 UTC] PHP Warning:  Undefined array key "night_phone_b" in /wp-content/plugins/quick-paypal-payments-premium/legacy/quick-paypal-payments.php on line 1386

    (I have reverted my site back to PHP 7.4 because of incompatibility with a different, unrelated plugin — so no urgency on the above fixes — just thought I would let you know)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alan Fuller

    (@alanfuller)

    Thankyou for making the effort to test.

    However, these are warnings, not compatibility issues. Warning are to help developers clean upcode but do not have a functional impact.

    See https://fullworks.net/docs/plugins-general/troubleshooting-plugins-general/php-notices-and-warnings/

    If you discover any FATAL errors please do let me know, so far in my PHP 8 testing I have not discovered any.

    By the way, you will find many notices and warnings for this plugin even in 7.4 – as mentioned they do not impact functionality and will be cleaned up over releases as that area of code is changed.

    Thread Starter Abigailm

    (@abigailm)

    Alan,
    The problem is that warnings can fill up logs on a server pretty quickly. In this case, a single instance generated 8 lines of PHP warnings. 8 lines isn’t much — but if the error is repeated on a moderately busy site over the course of a day, it’s not hard for log files to grow geometrically. I have tried to disable non-fatal error PHP warnings on my server but it just doesn’t work — they keep showing up in the logs.

    In my case it doesn’t matter, I can’t run PHP 8.0 on this particular site anyway, so it’s back to PHP 7.4— but I’m going to feel differently next November when active support for PHP 7.4 ends.

    And PHP “warnings” ultimately turn into fatal errors as new PHP versions are pushed out. So I simply wanted to let you know because I assume you want to create clean code in the end. I’d think it would be easier to note this now before it becomes a critical problem.

    Plugin Author Alan Fuller

    (@alanfuller)

    ” I have tried to disable non-fatal error PHP warnings on my server but it just doesn’t work — they keep showing up in the logs.”

    This is something you should take up with your host / server support.

    “And PHP “warnings” ultimately turn into fatal errors as new PHP versions are pushed out.”

    Yes exactly that why they are a developer tool and resolved. Just these ones won’t be resolved in a short period.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP 8 coding issues’ is closed to new replies.