Skip to content

Commit

Permalink
Merge pull request #122 from crodriguezbrito/fix/plugin-recomendations
Browse files Browse the repository at this point in the history
Fix prevent fatal error if $plugin_recomendations contains a WP_Error
  • Loading branch information
circlecube authored Nov 15, 2024
2 parents 354c917 + 211da20 commit 0cfa0ce
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 0cfa0ce

Please sign in to comment.