| @@ -300,9 +300,9 @@ | ||
| 300 | 300 | $new_field['original'] = $type; |
| 301 | 301 | |
| 302 | 302 | $this->prepare_field( $field, $new_field ); |
| 303 | 303 | |
| 304 | - $in_section = ! empty( $this->current_section ) && ! in_array( $new_type, $this->fields_with_end(), true ) && $new_type !== 'break'; | |
| 304 | + $in_section = $this->current_section && ! in_array( $new_type, $this->fields_with_end(), true ) && $new_type !== 'break'; | |
| 305 | 305 | |
| 306 | 306 | if ( $in_section ) { |
| 307 | 307 | $new_field['field_options']['in_section'] = $this->current_section['id']; |
| 308 | 308 | } |