Opened 6 years ago
Closed 6 years ago
#3556 closed defect (bug) (fixed)
warning generated by _pad_category_counts() when no posts
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | Template | Version: | 2.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
If there are no posts in the db, _pad_category_counts() generates a warning due to a foreach over an empty array. Diff attached.
Attachments (1)
Change History (3)
comment:1
foolswisdom — 6 years ago
Warning generated is:
Warning: Invalid argument supplied for foreach() in
/web/server/path/httpd.www/lions/wp-includes/category.php on line 297
Note: See
TracTickets for help on using
tickets.

fix empty foreach warning