diff --git a/dt-posts/dt-posts.php b/dt-posts/dt-posts.php index ca605e7ca4..2f6eea5f4c 100644 --- a/dt-posts/dt-posts.php +++ b/dt-posts/dt-posts.php @@ -247,9 +247,9 @@ public static function create_post( string $post_type, array $fields, bool $sile unset( $fields[ $field_key ] ); } if ( $field_type === 'number' && ( - isset( $post_settings['fields'][$field_key]['min_option'] ) && + isset( $post_settings['fields'][$field_key]['min_option'] ) && ( !empty( $post_settings['fields'][$field_key]['min_option'] ) || $post_settings['fields'][$field_key]['min_option'] === 0 ) && $field_value < $post_settings['fields'][$field_key]['min_option'] || - isset( $post_settings['fields'][$field_key]['max_option'] ) && + isset( $post_settings['fields'][$field_key]['max_option'] ) && ( !empty( $post_settings['fields'][$field_key]['max_option'] ) || $post_settings['fields'][$field_key]['max_option'] === 0 ) && $field_value > $post_settings['fields'][$field_key]['max_option'] ) ) { @@ -509,9 +509,9 @@ public static function update_post( string $post_type, int $post_id, array $fiel } if ( $field_type === 'number' && ( - isset( $post_settings['fields'][$field_key]['min_option'] ) && + isset( $post_settings['fields'][$field_key]['min_option'] ) && ( !empty( $post_settings['fields'][$field_key]['min_option'] ) || $post_settings['fields'][$field_key]['min_option'] === 0 ) && $field_value < $post_settings['fields'][$field_key]['min_option'] || - isset( $post_settings['fields'][$field_key]['max_option'] ) && + isset( $post_settings['fields'][$field_key]['max_option'] ) && ( !empty( $post_settings['fields'][$field_key]['max_option'] ) || $post_settings['fields'][$field_key]['max_option'] === 0 ) && $field_value > $post_settings['fields'][$field_key]['max_option'] ) ) {