• Resolved derfuchs98

    (@derfuchs98)


    Hi Anders,

    thank you for supporting Koji – after three years it’s still my favourite!

    Lately I find Nginx errors when posting new comments like this:

    PHP Warning: Attempt to read property "user_id" on null in /var/www/schulblog/wp-content/themes/koji/functions.php on line 708

    I’m not sure if the message is critical or not. It came up after upgrading to WP 6.0. As a workaround I could capture the error with an additional

    if($comments)

    in my child theme, though I’m not sure if this would cause other problems …

    It would be nice if you could have a look at this issue.

    Thanks

    Jürgen

    • This topic was modified 1 year, 11 months ago by derfuchs98.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @derfuchs98,

    Glad you like it!

    It seems like something is causing a faulty $comment object to passed along to the koji_filter_comment_text() function on your site. I can’t recreate the issue on my end (running 6.0), so I’m not sure what could be causing it, but I’ve added a check for an empty $comment object in the function to prevent the error. Update to 2.0.10 and see if that fixes it.

    — Anders

    Thread Starter derfuchs98

    (@derfuchs98)

    Thanks for your quick reply.

    I will also approach the two plugin authors involved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Nginx error on new comments’ is closed to new replies.