Make WordPress Core


Ignore:
Timestamp:
10/08/2020 09:13:57 PM (4 years ago)
Author:
SergeyBiryukov
Message:

General: Replace older-style PHP type conversion functions with type casts.

This improves performance, readability, and consistency throughout core.

  • intval()(int)
  • strval()(string)
  • floatval()(float)

Props ayeshrajans.
Fixes #42918.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r49078 r49108  
    709709        $path     = $base;
    710710    } else {
    711         $mydomain = "$domain";
     711        $mydomain = $domain;
    712712        $path     = $base . $blogname . '/';
    713713    }
     
    19711971    }
    19721972
    1973     $term_id = intval( $term_id );
     1973    $term_id = (int) $term_id;
    19741974    $c       = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->terms WHERE term_id = %d", $term_id ) );
    19751975
Note: See TracChangeset for help on using the changeset viewer.