Skip to content

Commit

Permalink
Merge pull request #3926 from impress-org/issue/3919
Browse files Browse the repository at this point in the history
fix: review Liquid Web's PHP 7.2 compatibility report #3919
  • Loading branch information
Devin Walker committed Jan 10, 2019
2 parents f817bc2 + 157cd25 commit d3f2ee3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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
6 changes: 5 additions & 1 deletion includes/class-give-background-updater.php
Expand Up @@ -230,7 +230,11 @@ protected function task( $update ) {
try{
// Run update.
if ( is_array( $update['callback'] ) ) {
$update['callback'][0]->$update['callback'][1]();
$object = $update['callback'][0];
$method_name = $update['callback'][1];

$object->$method_name();

} else {
$update['callback']();
}
Expand Down

0 comments on commit d3f2ee3

Please sign in to comment.