[wp-trac] [WordPress Trac] #63263: check if exists before accessing object properties of $post->comment_count
WordPress Trac
noreply at wordpress.org
Fri Apr 11 09:41:07 UTC 2025
#63263: check if exists before accessing object properties of $post->comment_count
--------------------------+------------------------------
Reporter: Presskopp | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by Presskopp):
Hi @abcd95
I only get the warning when I provoke it. This happens during testing, not
in productive operation. Nevertheless, I think the line should be changed.
You can provoke it by opening the Posts page and add a non existing page
query like ?p=12345 to it.
Sorry, I should have mentioned it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63263#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list