• Hi, first: thanks for this excellent plugin!

    One small issue I ran into: my error log is being flooded with PHP warning messages. I assume they are coming from one of the code snippets but… Since there are many snippets, is there a way to find out quickly from where it is coming?

    [02-Jun-2023 10:13:09 UTC] PHP Warning:  Undefined variable $args in /home/xxx/xxx/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(277) : eval()'d code on line 28
    [02-Jun-2023 10:13:09 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/xxx/xxx/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(277) : eval()'d code on line 28
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi Rolf,

    Thank you for the feedback. The best way to find the source of that notice is to go to the list of WPCode snippets on your site and use the top-right search box to search for “$args” https://a.supportally.com/i/SNYnhj

    From the list of results that you get (if there are multiple results), the snippet causing the issue should have the $args variable on line 28 of the PHP code.

    In this case, it looks like the $args variable is not defined there so you might need to add a check or adjust the name of the variable.

    If you need further assistance you can reach out using the form at https://wpcode.com/contact so that you can share the snippet code with us, we’ll try to suggest an adjustment.

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Hi @gripgrip thanks for pointing me to the search function right there in front of me! Excellent stuff ??

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