Remove triming from string options fixes #4781 props hakre
git-svn-id: http://svn.automattic.com/wordpress/trunk@6367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43b212e86d
commit
d26bff6a38
|
@ -291,10 +291,6 @@ function update_option( $option_name, $newvalue ) {
|
||||||
$safe_option_name = $wpdb->escape( $option_name );
|
$safe_option_name = $wpdb->escape( $option_name );
|
||||||
$newvalue = sanitize_option( $option_name, $newvalue );
|
$newvalue = sanitize_option( $option_name, $newvalue );
|
||||||
|
|
||||||
// Likely legacy -- can we drop this?
|
|
||||||
if ( is_string( $newvalue ) )
|
|
||||||
$newvalue = trim( $newvalue );
|
|
||||||
|
|
||||||
// If the new and old values are the same, no need to update.
|
// If the new and old values are the same, no need to update.
|
||||||
$oldvalue = get_option( $safe_option_name );
|
$oldvalue = get_option( $safe_option_name );
|
||||||
if ( $newvalue === $oldvalue )
|
if ( $newvalue === $oldvalue )
|
||||||
|
|
Loading…
Reference in New Issue