Skip to content

Commit

Permalink
chore: enforce array when filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
preda-bogdan committed Mar 30, 2024
1 parent 41c8ee7 commit 51a6dcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Modules/Featured_plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ private function get_plugins_filtered_from_author( $args, $filter_slugs = [], $a
$filtered = array_filter(
$api->plugins,
function( $plugin ) use ( $filter_slugs ) {
return in_array( $plugin['slug'], $filter_slugs );
$array_plugin = (array) $plugin;
return in_array( $array_plugin['slug'], $filter_slugs );
}
);

Expand Down

0 comments on commit 51a6dcc

Please sign in to comment.