Skip to content

Commit bfd1c8d

Browse files
committed
static-analysis] Fix php errors from static analysis.
1 parent 9d67cdd commit bfd1c8d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

includes/class-fs-plugin-updater.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ function plugins_api_filter( $data, $action = '', $args = null ) {
10491049
false
10501050
);
10511051

1052-
if ( is_array( $addon_plugin_data ) && $addon_plugin_data['Version'] ) {
1052+
if ( is_array( $addon_plugin_data ) && isset( $addon_plugin_data['Version'] ) ) {
10531053
$addon_version = $addon_plugin_data['Version'];
10541054
}
10551055
}

includes/fs-plugin-info-dialog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ function _get_addon_info_filter( $data, $action = '', $args = null ) {
229229
false
230230
);
231231

232-
if ( is_array( $addon_plugin_data ) && $addon_plugin_data['Version'] ) {
232+
if ( is_array( $addon_plugin_data ) && isset( $addon_plugin_data['Version'] ) ) {
233233
$current_addon_version = $addon_plugin_data['Version'];
234234
}
235235
}

templates/account.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157

158158
$site_view_params[] = $view_params;
159159

160-
if ( null === $install ) {
160+
if ( is_object( $install ) ) {
161161
continue;
162162
}
163163

@@ -186,6 +186,7 @@
186186

187187
$bundle_subscription = null;
188188
$is_bundle_first_payment_pending = false;
189+
$bundle_plan_title = '';
189190

190191
if (
191192
$show_plan_row &&
@@ -468,11 +469,10 @@ class="dashicons dashicons-image-rotate"></i> <?php fs_esc_html_echo_x_inline( '
468469
);
469470
}
470471
} else {
471-
$bundle_title = ( $has_bundle_license ? ucfirst( $fs->get_module_type() ) : '' );
472472
if ( $show_plan_row ) {
473473
$profile[] = array(
474474
'id' => 'plan',
475-
'title' => $bundle_title . ' ' . $plan_text,
475+
'title' => ( $has_bundle_license ? ucfirst( $fs->get_module_type() ) . ' ' : '' ) . $plan_text,
476476
'value' => strtoupper( is_string( $plan->name ) ?
477477
$plan->title :
478478
strtoupper( $free_text )
@@ -483,7 +483,7 @@ class="dashicons dashicons-image-rotate"></i> <?php fs_esc_html_echo_x_inline( '
483483
$profile[] = array(
484484
'id' => 'bundle_plan',
485485
'title' => $bundle_plan_text,
486-
'value' => $bundle_title
486+
'value' => $bundle_plan_title
487487
);
488488
}
489489
}

0 commit comments

Comments
 (0)