Skip to content

Commit e96f442

Browse files
committed
Split statements to fix syntax error in php older versions
1 parent 6c6fa3f commit e96f442

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugin/php/class-admin.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,11 @@ public function enqueue_assets() {
293293
$plugin_updates = get_site_transient( 'update_plugins' );
294294
$theme_updates = get_site_transient( 'update_themes' );
295295

296-
$plugin_status = isset( $plugin_updates->response[ $plugin_file ] ) ? ( (object) $plugin_updates->response[ $plugin_file ] )->new_version : '';
297-
$theme_status = isset( $theme_updates->response[ Plugin::THEME_SLUG ] ) ? ( (object) $theme_updates->response[ Plugin::THEME_SLUG ] )->new_version : '';
296+
$plugin_update = isset( $plugin_updates->response[ $plugin_file ] ) ? (object) $plugin_updates->response[ $plugin_file ] : false;
297+
$theme_update = isset( $theme_updates->response[ Plugin::THEME_SLUG ] ) ? (object) $theme_updates->response[ Plugin::THEME_SLUG ] : false;
298+
299+
$plugin_status = ! empty( $plugin_update ) ? $plugin_update->new_version : '';
300+
$theme_status = ! empty( $theme_update ) ? $theme_update->new_version : '';
298301

299302
wp_localize_script(
300303
'material-settings',

0 commit comments

Comments
 (0)