• Resolved dave8441

    (@dave8441)


    Hello,

    These errors appear in my server error log:

    [18-Jan-2023 17:19:06 UTC] PHP Warning: array_keys() expects parameter 1 to be array, null given in /home/doyles15/public_html/main/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 477
    [18-Jan-2023 17:19:06 UTC] PHP Warning: array_keys() expects parameter 1 to be array, null given in /home/doyles15/public_html/main/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 448
    [18-Jan-2023 17:19:06 UTC] PHP Warning: current() expects parameter 1 to be array, null given in /home/doyles15/public_html/main/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 449
    [18-Jan-2023 17:19:06 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/doyles15/public_html/main/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 428

    How can this be fixed?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • It would help to know what versions of PHP, WP and WC you’re on, and how to reproduce these errors.

    Roxy

    (@roxannestoltz)

    Hi there,

    Thanks for reaching out!

    These errors appear in my server error log:

    I understand that you are seeing PHP Warning errors in your error log.

    Do you perhaps recall any actions you may have performed before noticing these errors, such as updating any theme/plugin, or a specific site action, such as adding items to the cart?

    As a first step, I’d suggest performing a conflict test to rule out any theme/plugin conflicts with the latest version of WooCommerce.

    Please see the below documentation for a detailed explanation of how to perform a conflict test:

    https://docs.woocommerce.com/document/how-to-test-for-conflicts

    Should the issue persist after performing a conflict test, please share a copy of your sites System Status report, which you can find via?WooCommerce?→?Status. Select?Get system report?and then?Copy for support.

    Once you have this, please share the results in your response here, we’ll be happy to take a closer look!

    Thread Starter dave8441

    (@dave8441)

    Hi @galbaras,

    Thanks for your reply. Here is the info you asked for.

    PHP version: 7.4.33
    WordPress version: 6.1.1
    WooCommerce version: 7.3.0

    In the error log file, the errors always appear in groups of four (as shown above), and the group occurs repeatedly in a short time period. For example, today the errors occurred 15 times in the span of 2-1/2 minutes, which averages about 10 seconds apart. But after that, more errors do not occur in the log until several hours later, at which time it repeated 11 times in 3 minutes.

    Since the errors involve the cart, I tried placing test orders on my PC to reproduce the errors, but that did not trigger any. Then I tried it on my android phone and that triggered the error. But then I tried it again and nothing happened, so the results were mixed.

    Hi @roxannestoltz

    Thanks, I will try the conflict test and report back later.

    Looking at the plugin code, this makes me think that your shipping methods may not be defined properly. There seems to be something with a handle, but without values.

    Have a look at this guide and confirm that they are.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘server errors’ is closed to new replies.