Making WordPress.org

Changeset 10587


Ignore:
Timestamp:
01/15/2021 06:19:26 AM (4 years ago)
Author:
dd32
Message:

Translate: Avoid PHP Notices after r10575 and r10576 when the translation is being added without a translator detail.

See #5576.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/class-plugin.php

    r10576 r10587  
    205205        if (
    206206            ! $translation->id &&
     207            ! empty( $args['user_id'] ) &&
    207208            'waiting' === $args['status'] &&
    208209            GP::$current_route->class_name === 'GP_Route_Translation' &&
     
    266267    public function auto_reject_replaced_suggestions( GP_Translation $translation ) {
    267268        // If the suggestion isn't in a waiting status, it's can be skipped, they've got better access than most.
    268         if ( 'waiting' !== $translation->status ) {
     269        if ( 'waiting' !== $translation->status || ! $translation->user_id ) {
    269270            return;
    270271        }
Note: See TracChangeset for help on using the changeset viewer.