Make WordPress Core

Ticket #2591: serialize_all_options.diff

File serialize_all_options.diff, 640 bytes (added by markjaquith, 19 years ago)

Serialize all option values

  • wp-includes/functions.php

     
    365365                return true;
    366366        }
    367367
    368         if ( is_array($newvalue) || is_object($newvalue) )
    369                 $newvalue = serialize($newvalue);
     368        $newvalue = serialize($newvalue);
    370369
    371370        wp_cache_set($option_name, $newvalue, 'options');
    372371
     
    395394        if ( false !== get_option($name) )
    396395                return;
    397396
    398         if ( is_array($value) || is_object($value) )
    399                 $value = serialize($value);
     397        $value = serialize($value);
    400398
    401399        wp_cache_set($name, $value, 'options');
    402400