Skip to content

Commit

Permalink
fix: improve code as optional param is now required so no conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
mehul0810 committed Jan 8, 2019
1 parent f2f10dc commit e449346
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,8 @@ function give_export_donation_form_search_args( $args ) {
$fields = isset( $_POST['fields'] ) ? $_POST['fields'] : null;

// Using parse_str() function without the result parameter is highly DISCOURAGED and DEPRECATED as of PHP 7.2.
if ( version_compare( phpversion(), '7.2.0', '>=' ) ) {
$fields_result_array = array();
parse_str( $fields, $fields_result_array );
} else {
parse_str( $fields );
}
$fields_result_array = array();
parse_str( $fields, $fields_result_array );

if ( ! empty( $give_forms_categories ) || ! empty( $give_forms_tags ) ) {
$args['posts_per_page'] = - 1;
Expand Down

0 comments on commit e449346

Please sign in to comment.