Make WordPress Core

Changeset 2717


Ignore:
Timestamp:
07/17/2005 06:41:11 PM (20 years ago)
Author:
ryan
Message:

Trim option value only if it is a string. Don't trim objects and arrays. Props: Jason Bainbridge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r2716 r2717  
    329329    global $wpdb, $cache_settings;
    330330
    331     $newvalue = trim($newvalue); // I can't think of any situation we wouldn't want to trim
    332 
     331    if ( is_string($newvalue) )
     332        $newvalue = trim($newvalue);
     333   
    333334    // If the new and old values are the same, no need to update.
    334335    if ( $newvalue == get_option($option_name) )
Note: See TracChangeset for help on using the changeset viewer.