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/rest-api/endpoints/class-wp-rest-attachments-controller.php

    r54524 r54891  
    767767            // Ensure empty details is an empty object.
    768768            if ( empty( $data['media_details'] ) ) {
    769                 $data['media_details'] = new stdClass;
     769                $data['media_details'] = new stdClass();
    770770            } elseif ( ! empty( $data['media_details']['sizes'] ) ) {
    771771
     
    798798                }
    799799            } else {
    800                 $data['media_details']['sizes'] = new stdClass;
     800                $data['media_details']['sizes'] = new stdClass();
    801801            }
    802802        }
Note: See TracChangeset for help on using the changeset viewer.