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-admin/media-upload.php

    r48941 r49108  
    5252// Upload type: image, video, file, ...?
    5353if ( isset( $_GET['type'] ) ) {
    54     $type = strval( $_GET['type'] );
     54    $type = (string) $_GET['type'];
    5555} else {
    5656    /**
     
    6767// Tab: gallery, library, or type-specific.
    6868if ( isset( $_GET['tab'] ) ) {
    69     $tab = strval( $_GET['tab'] );
     69    $tab = (string) $_GET['tab'];
    7070} else {
    7171    /**
Note: See TracChangeset for help on using the changeset viewer.