Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #49853, comment 5


Ignore:
Timestamp:
04/09/2020 08:39:13 AM (5 years ago)
Author:
MattyRob
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #49853, comment 5

    initial v1  
    55In my testing `if ( trim( $post_title ) === '' )` works as expected and maintains the strict comparison:
    66
    7 `$tests = array( 0, NULL, 'foo', '', '0' );
     7{{{#!php
     8<?php
     9$tests = array( 0, NULL, 'foo', '', '0' );
    810foreach ( $tests as $test ) {
    911        if ( '' === trim( $test ) ) {
     
    1113                echo ' is empty!';
    1214        }
    13 }`
     15}
     16}}}
     17