[wp-trac] [WordPress Trac] #39361: Object not properly tested against in wp-includes/post-template.php

WordPress Trac noreply at wordpress.org
Wed Dec 21 10:23:40 UTC 2016


#39361: Object not properly tested against in wp-includes/post-template.php
----------------------------+-----------------------------
 Reporter:  fourstringfail  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  4.7
 Severity:  normal          |   Keywords:
  Focuses:  performance     |
----------------------------+-----------------------------
 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

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39361>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list