[wp-trac] [WordPress Trac] #47849: Post excerpts accept spaces

WordPress Trac noreply at wordpress.org
Fri Aug 9 10:10:36 UTC 2019


#47849: Post excerpts accept spaces
-------------------------------+-----------------------------
 Reporter:  adeltahri          |       Owner:  SergeyBiryukov
     Type:  defect (bug)       |      Status:  reviewing
 Priority:  normal             |   Milestone:  5.3
Component:  Posts, Post Types  |     Version:  5.2.2
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+-----------------------------

Comment (by birgire):

 I recall that the combination {{{empty( trim() )}}} did result in a fatal
 error in some older PHP versions.

 To be sure I checked here:

 https://3v4l.org/MKi5E

 It runs successfully for PHP 5.5+, and since the minimum of WordPress is
 now at PHP 5.6 it should be ok.

 For PHP 5.4- versions the error is:

 {{{
 Fatal error: Can't use function return value in write context in /in/MKi5E
 on line 3
 }}}


 ps. the tests in [attachment:"47849.2.diff"] might need a slight WPCS
 adjuments, like the array alignments.

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


More information about the wp-trac mailing list