Making WordPress.org

Changeset 9768


Ignore:
Timestamp:
04/23/2020 03:08:47 AM (6 years ago)
Author:
dd32
Message:

Plugin Directory: API: Avoid a PHP Notice when a plugin has no contributors and is being requested by an older version of WordPress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api.php

    r8440 r9768  
    171171                // WordPress 4.9 and older need a "bare" contributor map [ user => profile ]
    172172                if ( ! empty( $fields['bare_contributors'] ) ) {
    173                         $contribs                 = $response['contributors'];
     173                        $contribs                 = $response['contributors'] ?? [];
    174174                        $response['contributors'] = array();
    175175                        if ( $contribs ) {
Note: See TracChangeset for help on using the changeset viewer.