| @@ -177,9 +177,9 @@ | ||
| 177 | 177 | * |
| 178 | 178 | * @param array $form |
| 179 | 179 | * @param string $value |
| 180 | 180 | * |
| 181 | - * @return string | |
| 181 | + * @return array|string | |
| 182 | 182 | */ |
| 183 | 183 | private static function get_selected_in_form( $form, $value = 'form' ) { |
| 184 | 184 | if ( $form && ! empty( $form[ $value ] ) ) { |
| 185 | 185 | return $form[ $value ]; |
| @@ -741,12 +741,12 @@ | ||
| 741 | 741 | |
| 742 | 742 | $entry_ids = FrmDb::get_col( $wpdb->prefix . 'frm_items it', $query ); |
| 743 | 743 | unset( $query ); |
| 744 | 744 | |
| 745 | - if ( ! $entry_ids ) { | |
| 745 | + if ( $entry_ids ) { | |
| 746 | + FrmCSVExportHelper::generate_csv( compact( 'form', 'entry_ids', 'form_cols' ) ); | |
| 747 | + } else { | |
| 746 | 748 | esc_html_e( 'There are no entries for that form.', 'formidable' ); |
| 747 | - } else { | |
| 748 | - FrmCSVExportHelper::generate_csv( compact( 'form', 'entry_ids', 'form_cols' ) ); | |
| 749 | 749 | } |
| 750 | 750 | |
| 751 | 751 | wp_die(); |
| 752 | 752 | } |