Skip to content

Commit 7ea7701

Browse files
authored
Merge pull request #741 from 10up/fix/null-settings
Change how we check for settings to support `null` values
2 parents 378e225 + 910dab3 commit 7ea7701

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/Classifai/Features/Feature.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public function add_provider_fields() {
393393
*/
394394
protected function merge_settings( array $settings = [], array $defaults = [] ): array {
395395
foreach ( $defaults as $key => $value ) {
396-
if ( ! isset( $settings[ $key ] ) ) {
396+
if ( ! array_key_exists( $key, $settings ) ) {
397397
$settings[ $key ] = $defaults[ $key ];
398398
} elseif ( is_array( $value ) ) {
399399
if ( is_array( $settings[ $key ] ) ) {

0 commit comments

Comments
 (0)