Skip to content

Instantly share code, notes, and snippets.

@paulgibbs
Created March 26, 2014 19:23
Show Gist options
  • Save paulgibbs/9791193 to your computer and use it in GitHub Desktop.
Save paulgibbs/9791193 to your computer and use it in GitHub Desktop.
diff --git a/bp-xprofile/bp-xprofile-filters.php b/bp-xprofile/bp-xprofile-filters.php
index cfac474..c049194 100644
--- a/bp-xprofile/bp-xprofile-filters.php
+++ b/bp-xprofile/bp-xprofile-filters.php
@@ -73,8 +73,6 @@ function xprofile_filter_kses( $content ) {
}
/**
- * xprofile_sanitize_data_value_before_save ( $field_value, $field_id )
- *
* Safely runs profile field data through kses and force_balance_tags.
*
* @param string $field_value
@@ -85,8 +83,9 @@ function xprofile_filter_kses( $content ) {
function xprofile_sanitize_data_value_before_save ( $field_value, $field_id, $reserialize = true ) {
// Return if empty
- if ( empty( $field_value ) )
- return;
+ if ( empty( $field_value ) ) {
+ return $field_value;
+ }
// Value might be serialized
$field_value = maybe_unserialize( $field_value );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment