Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update plugins.php
  • Loading branch information
narenin authored Sep 25, 2024
commit d17c8351684d4c48e11f8a4f28324e6ce0245aa9
2 changes: 1 addition & 1 deletion plugins/performance-lab/includes/admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function perflab_query_plugin_info( string $plugin_slug ) {
}

/* Check if the response contains plugins. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Check if the response contains plugins. */
// Check if the response contains plugins.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@westonruter Thanks for the feedback, I have implemented this one.

if ( ! isset( $response->plugins ) || ! is_array( $response->plugins ) ) {
if ( ! is_object( $response ) || ! isset( $response->plugins ) || ! is_array( $response->plugins ) ) {
return new WP_Error( 'no_plugins', __( 'No plugins found in the API response.', 'performance-lab' ) );
}

Expand Down