WordPress.org

Make WordPress Core

Ticket #14509: maybe_unserialize_no_double.diff

File maybe_unserialize_no_double.diff, 444 bytes (added by shawnparker, 8 years ago)

patch for maybe_unserialize to not double-serialize

  • wp-includes/functions.php

     
    10051005        if ( is_array( $data ) || is_object( $data ) )
    10061006                return serialize( $data );
    10071007
    1008         if ( is_serialized( $data ) )
     1008        if ( !is_serialized( $data ) )
    10091009                return serialize( $data );
    10101010
    10111011        return $data;