[wp-trac] [WordPress Trac] #36934: Use of get_the_excerpt($post) is broken if post has no excerpt and you are inside a loop

WordPress Trac noreply at wordpress.org
Fri Jul 28 18:26:56 UTC 2017


#36934: Use of get_the_excerpt($post) is broken if post has no excerpt and you are
inside a loop
-------------------------------------------------+-------------------------
 Reporter:  magicroundabout                      |       Owner:  swissspidy
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  4.9
Component:  Formatting                           |     Version:  4.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:  template
  tests dev-feedback                             |
-------------------------------------------------+-------------------------

Comment (by swissspidy):

 Unfortunately there are some failing tests :(

 {{{
 1) Tests_Query_SetupPostdata::test_page_from_wp_query
 Failed asserting that 1 is identical to 78.

 tests/phpunit/tests/query/setupPostdata.php:234

 2) Tests_Query_SetupPostdata::test_secondary_query_page
 Failed asserting that 1 is identical to 3.

 tests/phpunit/tests/query/setupPostdata.php:256

 3) Tests_Query_SetupPostdata::test_setup_postdata_loop
 Failed asserting that '<p>global post</p>' is not equal to
 <string:<p>global post</p>>.

 tests/phpunit/tests/query/setupPostdata.php:377
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36934#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list