Make WordPress Core

Ticket #4029: maybe_serialize.diff

File maybe_serialize.diff, 426 bytes (added by takayukister, 18 years ago)

Serialize if target is *not* serialized.

  • wp-includes/functions.php

     
    404404                $data = trim($data);
    405405        elseif ( is_array($data) || is_object($data) )
    406406                return serialize($data);
    407         if ( is_serialized($data) )
     407        if ( !is_serialized($data) )
    408408                return serialize($data);
    409409        return $data;
    410410}