Opened 10 years ago
Closed 2 years ago
#39361 closed defect (bug) (invalid)
Object not properly tested against in wp-includes/post-template.php
| Reported by: | fourstringfail | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 4.7 |
| Severity: | normal | Keywords: | reporter-feedback |
| Cc: | Focuses: | performance |
Description
PHP Notice: Trying to get property of non-object in /home/coffeet9/public_html/wp-includes/post-template.php on line 298
line 298:
if ( false !== strpos( $post->post_content, '<!--noteaser-->' ) && ( ! $multipage || $page == 1 ) ) $strip_teaser = true;
Requires if(isset($post->post_content)) so that null variables aren't tested against
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the report, @fourstringfail.
Can you tell us in what situation the
post_contentproperty would not be set here?