Opened 9 years ago
Closed 9 years ago
#2878 closed defect (bug) (worksforme)
Comments template: Trying to get property of non-object
Reported by: | GDragoN | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | trunk |
Component: | Appearance - Theme Compatibility | Keywords: | |
Cc: |
Description
When using theme compatibility mode, and if the page.php template loads comments form, comments_form function is trying to load the post. Since theme comaptibility provides dummy post that can have invalid / missing ID, this will trigger following PHP notice:
Trying to get property of non-object On line: 1050, In file: D:\xampp\htdocs\sites\www.dev4press.dev\wp-includes\comment-template.php From: require, require_once, include, comments_template, require, comment_form, comments_open
I have attached the patch that will add the dummy post to cache to solve the issue.
Milan Petrovic
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
I can't reproduce this using the defaul WP themes. Maybe this is any issue with the theme you are using?