comments_open causes PHP notice in certain cases
|Reported by:||willnorris||Owned by:|
when comments_open() is called for a non-existant post (either a bad ID, or no ID passed and called from a non-single page), a PHP notice is caused. Ideally, plugins shouldn't be doing this, but a simple null check in comments_open() fixes the problem.
Change History (6)
comment:2 @SergeyBiryukov — 2 years ago
- Component changed from Comments to Warnings/Notices
- Version changed from trunk to 2.5