WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/08/2020 09:13:57 PM (14 months 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/network/upgrade.php

    r47852 r49108  
    4646switch ( $action ) {
    4747    case 'upgrade':
    48         $n = ( isset( $_GET['n'] ) ) ? intval( $_GET['n'] ) : 0;
     48        $n = ( isset( $_GET['n'] ) ) ? (int) $_GET['n'] : 0;
    4949
    5050        if ( $n < 5 ) {
Note: See TracChangeset for help on using the changeset viewer.