Changeset 3805
- Timestamp:
- 08/12/2016 06:35:22 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api.php
r3554 r3805 120 120 $contribs = $response['contributors']; 121 121 $response['contributors'] = array(); 122 foreach ( $contribs as $user => $data ) { 123 $response['contributors'][ $user ] = $data['profile']; 122 if ( $contribs ) { 123 foreach ( $contribs as $user => $data ) { 124 $response['contributors'][ $user ] = $data['profile']; 125 } 124 126 } 125 127 } … … 159 161 } 160 162 161 // Trim fields 163 // Trim fields and cast to object 162 164 foreach ( $response['plugins'] as $i => $plugin_data ) { 163 $response['plugins'][$i] = $this->remove_unexpected_fields( $plugin_data, $request, 'query_plugins' );165 $response['plugins'][$i] = (object) $this->remove_unexpected_fields( $plugin_data, $request, 'query_plugins' ); 164 166 } 165 167
Note: See TracChangeset
for help on using the changeset viewer.