Skip to content

Commit

Permalink
static-analysis] Fix php errors from static analysis.
Browse files Browse the repository at this point in the history
  • Loading branch information
bahiirwa committed Apr 16, 2024
1 parent 9d67cdd commit bfd1c8d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion includes/class-fs-plugin-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ function plugins_api_filter( $data, $action = '', $args = null ) {
false
);

if ( is_array( $addon_plugin_data ) && $addon_plugin_data['Version'] ) {
if ( is_array( $addon_plugin_data ) && isset( $addon_plugin_data['Version'] ) ) {
$addon_version = $addon_plugin_data['Version'];
}
}
Expand Down
2 changes: 1 addition & 1 deletion includes/fs-plugin-info-dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ function _get_addon_info_filter( $data, $action = '', $args = null ) {
false
);

if ( is_array( $addon_plugin_data ) && $addon_plugin_data['Version'] ) {
if ( is_array( $addon_plugin_data ) && isset( $addon_plugin_data['Version'] ) ) {
$current_addon_version = $addon_plugin_data['Version'];
}
}
Expand Down
8 changes: 4 additions & 4 deletions templates/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

$site_view_params[] = $view_params;

if ( null === $install ) {
if ( is_object( $install ) ) {
continue;
}

Expand Down Expand Up @@ -186,6 +186,7 @@

$bundle_subscription = null;
$is_bundle_first_payment_pending = false;
$bundle_plan_title = '';

if (
$show_plan_row &&
Expand Down Expand Up @@ -468,11 +469,10 @@ class="dashicons dashicons-image-rotate"></i> <?php fs_esc_html_echo_x_inline( '
);
}
} else {
$bundle_title = ( $has_bundle_license ? ucfirst( $fs->get_module_type() ) : '' );
if ( $show_plan_row ) {
$profile[] = array(
'id' => 'plan',
'title' => $bundle_title . ' ' . $plan_text,
'title' => ( $has_bundle_license ? ucfirst( $fs->get_module_type() ) . ' ' : '' ) . $plan_text,
'value' => strtoupper( is_string( $plan->name ) ?
$plan->title :
strtoupper( $free_text )
Expand All @@ -483,7 +483,7 @@ class="dashicons dashicons-image-rotate"></i> <?php fs_esc_html_echo_x_inline( '
$profile[] = array(
'id' => 'bundle_plan',
'title' => $bundle_plan_text,
'value' => $bundle_title
'value' => $bundle_plan_title
);
}
}
Expand Down

0 comments on commit bfd1c8d

Please sign in to comment.