Make WordPress Core


Ignore:
Timestamp:
11/29/2022 03:49:49 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Always use parentheses when instantiating an object.

Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.

File:
1 edited

Legend:

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

    r54287 r54891  
    4545
    4646    if ( ! is_object( $current ) ) {
    47         $current                  = new stdClass;
     47        $current                  = new stdClass();
    4848        $current->updates         = array();
    4949        $current->version_checked = $wp_version;
     
    328328
    329329    if ( ! is_object( $current ) ) {
    330         $current = new stdClass;
    331     }
    332 
    333     $updates               = new stdClass;
     330        $current = new stdClass();
     331    }
     332
     333    $updates               = new stdClass();
    334334    $updates->last_checked = time();
    335335    $updates->response     = array();
     
    596596
    597597    if ( ! is_object( $last_update ) ) {
    598         $last_update = new stdClass;
     598        $last_update = new stdClass();
    599599    }
    600600
     
    735735    }
    736736
    737     $new_update               = new stdClass;
     737    $new_update               = new stdClass();
    738738    $new_update->last_checked = time();
    739739    $new_update->checked      = $checked;
     
    847847    require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
    848848
    849     $upgrader = new WP_Automatic_Updater;
     849    $upgrader = new WP_Automatic_Updater();
    850850    $upgrader->run();
    851851}
Note: See TracChangeset for help on using the changeset viewer.