From 7f3e59887d0beb151eb176fa9b0b23cb698f9b42 Mon Sep 17 00:00:00 2001 From: david-binda Date: Wed, 7 Oct 2015 14:11:34 +0200 Subject: [PATCH] `sanitize_text_field_by_reference` is a method, not a function. using `array( $this, 'sanitize_text_field_by_reference' )` instead of `sanitize_text_field_by_reference` as a callback param of `array_walk_recursive` fixes #343 --- class-jobs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class-jobs.php b/class-jobs.php index b9f6c1b..c12cb70 100755 --- a/class-jobs.php +++ b/class-jobs.php @@ -707,7 +707,7 @@ public function save_job( $job_id, WP_Post $job ) { $terms_data = stripslashes_deep( $_POST['bbl_translation']['terms'] ); if ( true === is_array( $terms_data ) ) { - array_walk_recursive( $terms_data, 'sanitize_text_field_by_reference' ); + array_walk_recursive( $terms_data, array( $this, 'sanitize_text_field_by_reference' ) ); } else { $terms_data = sanitize_text_field( $terms_data ); }