Skip to:
Content

bbPress.org

Opened 4 years ago

Closed 3 years ago

#2878 closed defect (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)

theme-compat.php.patch (615 bytes) - added by GDragoN 4 years ago.

Download all attachments as: .zip

Change History (3)

#1 @thebrandonallen
4 years ago

  • Keywords reporter-feedback added

I can't reproduce this using the defaul WP themes. Maybe this is any issue with the theme you are using?

#2 @thebrandonallen
3 years ago

  • Keywords has-patch reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Works for me on trunk.

Note: See TracTickets for help on using tickets.