Skip to content

Commit

Permalink
In cbox-polyfill for get_site_template_id(), ensure that saved option…
Browse files Browse the repository at this point in the history
…s are returned as integers.

Otherwise strict comparisons will fail later. In this case, it was causing an extra
instance of the fallback site ID to be appended to the Site Templates > Group Type Templates
panel in some cases.

See #3227.
  • Loading branch information
boonebgorges committed Sep 19, 2023
1 parent 264fafd commit c17c2db
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function get_label() {
*/
public function get_site_template_id() {
$site_template_ids = get_option( 'openlab_group_type_default_site_template_ids' );
$site_template_ids = array_map( 'intval', $site_template_ids );

$saved_site_template_is_valid = false;

Expand Down

0 comments on commit c17c2db

Please sign in to comment.