[wp-trac] [WordPress Trac] #3556: warning generated by _pad_category_counts() when no posts
WordPress Trac
noreply at wordpress.org
Mon Feb 12 06:03:05 UTC 2024
#3556: warning generated by _pad_category_counts() when no posts
--------------------------+---------------------
Reporter: dougal | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 2.1
Component: Template | Version: 2.1
Severity: normal | Resolution: fixed
Keywords: | Focuses:
--------------------------+---------------------
Comment (by rachmaninoffsgjud3):
It seems that when there are no posts in the database,
_pad_category_counts() generates a warning due to a foreach loop over an
empty array. I've attached a diff file that addresses this issue.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/3556#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list