[wp-trac] [WordPress Trac] #48965: Prefer strict PHP comparisons over loose PHP comparisons

WordPress Trac noreply at wordpress.org
Wed Apr 8 14:44:01 UTC 2020


#48965: Prefer strict PHP comparisons over loose PHP comparisons
-------------------------+-------------------------------
 Reporter:  pikamander2  |       Owner:  SergeyBiryukov
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  5.4
Component:  General      |     Version:
 Severity:  minor        |  Resolution:  fixed
 Keywords:               |     Focuses:  coding-standards
-------------------------+-------------------------------

Comment (by pikamander2):

 I guess the simple fix here would be something like this:

 {{{#!php
 <?php
 if ( true === empty($post_title) )
 }}}

 @Otto42 - When applied to wp-mail.php, does that code fix your problem?

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


More information about the wp-trac mailing list