Skip to content

Commit e2dde55

Browse files
committed
fix: cast icons and banners from update response to array
1 parent 82a722a commit e2dde55

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Modules/Licenser.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,12 @@ private function get_version_data() {
667667
if ( isset( $update_data->slug ) ) {
668668
$update_data->slug = $this->product->get_slug();
669669
}
670+
if ( isset( $update_data->icons ) ) {
671+
$update_data->icons = (array) $update_data->icons;
672+
}
673+
if ( isset( $update_data->banners ) ) {
674+
$update_data->banners = (array) $update_data->banners;
675+
}
670676
return $update_data;
671677
}
672678

@@ -696,7 +702,6 @@ public function pre_set_site_transient_update_plugins_filter( $_transient_data )
696702
$_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response;
697703
}
698704
}
699-
700705
return $_transient_data;
701706
}
702707

0 commit comments

Comments
 (0)