Skip to content

Commit 3973a3a

Browse files
committed
Change how we check for our settings to support null values
1 parent fd8991c commit 3973a3a

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
$settings[ $key ] = $this->merge_settings( $settings[ $key ], $defaults[ $key ] );

0 commit comments

Comments
 (0)