Skip to content

Commit

Permalink
Fix prevent fatal error if $plugin_recomendation contains a WP_Error
Browse files Browse the repository at this point in the history
  • Loading branch information
crodriguezbrito committed Nov 7, 2024
1 parent 99d9047 commit 211da20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Services/SiteGenService.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ public static function get_plugin_recommendations() {
'plugin_recommendation'
);

if ( isset( $plugin_recommendations['error'] ) || is_wp_error( $plugin_recommendations ) ) {
if ( is_wp_error( $plugin_recommendations ) || isset( $plugin_recommendations['error'] ) ) {
return new \WP_Error(
'nfd_onboarding_error',
__( 'Cannot retrieve plugin recommendations.', 'wp-module-onboarding-data' ),
Expand Down

0 comments on commit 211da20

Please sign in to comment.