Skip to content

Commit

Permalink
Merge pull request #3377 from 10up/fix/warnings-on-feature
Browse files Browse the repository at this point in the history
Fix: Undefined array key 'force_inactive'
  • Loading branch information
felipeelia authored Mar 7, 2023
2 parents b33adc5 + 7aa6e2b commit bfcdd5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/classes/Features.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function update_feature( $slug, $settings, $force = true ) {
* Prepare settings
*/
$saved_settings = Utils\get_option( 'ep_feature_settings', [] );
$feature_settings = isset( $saved_settings[ $slug ] ) ? $saved_settings[ $slug ] : [];
$feature_settings = isset( $saved_settings[ $slug ] ) ? $saved_settings[ $slug ] : [ 'force_inactive' => false ];

$new_feature_settings = $feature->default_settings;
$new_feature_settings = wp_parse_args( $feature_settings, $new_feature_settings );
Expand Down

0 comments on commit bfcdd5f

Please sign in to comment.