Don't loosely compare functions that return bool against a literal bool.

See #32444.

Built from https://develop.svn.wordpress.org/trunk@32730


git-svn-id: http://core.svn.wordpress.org/trunk@32701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-06-12 17:19:27 +00:00
parent 107d5b088d
commit d2a00338f6
6 changed files with 8 additions and 8 deletions

View File

@ -133,9 +133,9 @@ function export_wp( $args = array() ) {
* @return string
*/
function wxr_cdata( $str ) {
if ( seems_utf8( $str ) == false )
if ( ! seems_utf8( $str ) ) {
$str = utf8_encode( $str );
}
// $str = ent2ncr(esc_html($str));
$str = '<![CDATA[' . str_replace( ']]>', ']]]]><![CDATA[>', $str ) . ']]>';

View File

@ -182,7 +182,7 @@ unset($id, $data, $subs, $first_sub);
$separator_found = false;
foreach ( $menu as $id => $data ) {
if ( 0 == strcmp('wp-menu-separator', $data[4] ) ) {
if (false == $separator_found) {
if ( ! $separator_found ) {
$separator_found = true;
} else {
unset($menu[$id]);

View File

@ -453,9 +453,9 @@ function display_space_usage() {
* @return int Max size in bytes
*/
function fix_import_form_size( $size ) {
if ( upload_is_user_over_quota( false ) == true )
if ( upload_is_user_over_quota( false ) ) {
return 0;
}
$available = get_upload_space_available();
return min( $size, $available );
}

View File

@ -76,7 +76,7 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
if ( !$user_id ) { // Create a new user with a random password
$password = wp_generate_password( 12, false );
$user_id = wpmu_create_user( $domain, $password, $email );
if ( false == $user_id )
if ( false === $user_id )
wp_die( __( 'There was an error creating the user.' ) );
else
wp_new_user_notification( $user_id, $password );

View File

@ -70,7 +70,7 @@ if ( $action ) {
$password = wp_generate_password( 12, false);
$user_id = wpmu_create_user( esc_html( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) );
if ( false == $user_id ) {
if ( false === $user_id ) {
$update = 'err_new_dup';
} else {
wp_new_user_notification( $user_id, $password );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32729';
$wp_version = '4.3-alpha-32730';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.