• Hi. This plugin is not essential to our business, so I’ve disabled it for now. If there’s a solution, I’m all ears (or eyes), but this is more of a bug report.

    Caveat: I’m not a PHP person, so I’m out of my depth, here. It was reported by IT at Dreamhost, who were looking into 504s on our site. They came up with the following:

    PHP Warning: array_diff(): Expected parameter 2 to be an array, bool
    given in
    /home/wp_agqz62/concordcheeseshop.com/wp-content/plugins/order-hours-scheduler-for-woocommerce/includes/Aspect/Page.php
    on line 116

    [Wed Oct 21 00:43:48.461661 2020] [proxy_fcgi:error] [pid 1388:tid
    140007998183168] [client 54.36.148.129:53216] AH01071: Got error ‘PHP
    message: No products in the order’

    Anyway, that’s all I got.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bizswoop

    (@bizswoop)

    Thanks for reaching out and sharing the PHP Warning message with us.
     
    We’d be happy to explain the behavior of the plugin code related to this warning message flagged by the Dreamhost IT team.

    Included in our code in a function, we check if the current page is the Admin Dashboard. As part of the function, using the php function parse_url we parse the URL and components of the URL. Based upon the results, we load code to operate and manage the functionality of Store Hours Manager. If the current page is not the Admin Dashboard, the code related to our functionality Store Hours Manager is not loaded. 

    What this warning message you shared indicated, when the function code check occurred on the page in question, the result was the error to validate the URL to verify the URL is the Admin Dashboard. The page in question, the function couldn’t validate the URL, this could be due to an error on the page or a complex URL structure.  The typical result, you will see this type of warning message in the debug log for PHP, which is what the Dreamhost IT shared. The worst result, if you are on an admin dashboard, the Store Hours Manager plugin failed to recognize that as true, so the plugin would not function correctly.

    Now, if the Store Hours Manager plugin while on the Admin Dashboard is not operating or working correctly, we’d like to better understand the URL structure you are using to understand why the check would be failing. But if the plugin is working correctly, the page in question was not an admin page. As a result, the warning can be disregarded as an indication of that check and this warning shouldn’t affect the overall performance of your website or cause any 504 timeout errors.
     
    We hope that clarifies the PHP warning message and reference to our code shared by Dreamhost IT.

    Thread Starter CountVonJackula

    (@countvonjackula)

    Thanks for the reply. I’m sure it will inform someone’s actions some where. I’m no developer, so I’m just deleting the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Warning’ is closed to new replies.