• Resolved nootkan

    (@nootkan)


    So I am seeing these in my debug logs and wanted to know if they are known issues yet to be addressed?

    [03-Feb-2025 17:51:41 UTC] PHP Warning: Undefined variable $value in /wp-includes/class-wp-list-util.php on line 166
    [03-Feb-2025 17:51:41 UTC] PHP Warning: Undefined variable $value in /wp-includes/class-wp-list-util.php on line 168
    [03-Feb-2025 17:51:41 UTC] PHP Notice: Function WP_List_Util::pluck was called incorrectly. Values for the input array must be either objects or arrays. Please see Debugging in WordPress for more information. (This message was added in version 6.2.0.) in /wp-includes/functions.php on line 6114
    [03-Feb-2025 17:52:21 UTC] PHP Parse error: syntax error, unexpected string content "/^("[^"]*("|$" in /wp-includes/kses.php on line 1864

    I have disabled all plugins switched to the 2025 theme and issues still there, also re-installed wp 6.7.1.

    Server creds are: 
    Alama Linux 8.10.0,
    apache 2.4.63,
    php 8.2,
    mysql 8.0.41,
    kernel 4.18.0-477.27.2.el8_8.x86_64
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bcworkz

    (@bcworkz)

    Your WP installation appears to still be corrupted. I cannot replicate these errors under the same conditions — no plugins, latest theme, v6.71. How did you re-install WP? I suspect you used the Re-install button on the updates admin screen? Oddly, that method is not all that thorough. For a complete replacement of all files you need to do a manual “update”, even though it’ll be to the same version.

    Moderator threadi

    (@threadi)

    The error could relate to content from the database that is saved in the wrong format. The places mentioned in the code run through a list of values. One of them seems to be wrong. How to find it could be very difficult. It may only occur with certain calls, in which case you could use this to narrow it down.

    Thread Starter nootkan

    (@nootkan)

    Okay thanks guys. Appreciate the feedback. I’ll keep troubleshooting and see if I can find it somehow. If someone else reads this and had the same or similar issue I’d appreciate some direction thanks.

    Moderator bcworkz

    (@bcworkz)

    You could try modifying the WP source code to help you identify the root cause. We normally shouldn’t modify WP source code, but you’re only doing it temporarily to help solve a problem. Revert any changes you’ve made once you’re finished with them.

    You could var_dump or error_log $this->output just before where the error occurs. Perhaps the content of the output list will look familiar and be a clue to the root cause.

    Or get a debug backtrace from where the error occurs. It’s a list of function calls that were made to get to that point. The root cause is likely a call made by your theme or a plugin. Add error_log( wp_debug_backtrace_summary() ); to just before where the error occurs, then check your server’s error log.

    Thread Starter nootkan

    (@nootkan)

    Thought I’d update this post and say that I got it resolved. It turned out to be a custom function in my child theme’s functions.php. The issue was in my force_shipping_recalc() function, which was hooked to woocommerce_before_calculate_totals with a priority of 99. This function was being called before the cart item’s line_total values are calculated. The fix was to change the timing of when the force_shipping_recalc() function ran. Also added a check to make sure cart items have line_total values before trying to calculate shipping. The PHP Warning: Undefined array key “line_total” has disappeared.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Core WP File Warnings’ is closed to new replies.