Make WordPress Core

Changeset 57389


Ignore:
Timestamp:
01/30/2024 02:23:06 PM (6 months ago)
Author:
jorbin
Message:

Install: When populating options, maybe_serialize instead of always serialize.

Props xknown, peterwilsoncc, jorbin, desrosj.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/schema.php

    r56657 r57389  
    600600        }
    601601
    602         if ( is_array( $value ) ) {
    603             $value = serialize( $value );
    604         }
    605 
    606602        if ( ! empty( $insert ) ) {
    607603            $insert .= ', ';
    608604        }
     605
     606        $value = maybe_serialize( sanitize_option( $option, $value ) );
    609607
    610608        $insert .= $wpdb->prepare( '(%s, %s, %s)', $option, $value, $autoload );
Note: See TracChangeset for help on using the changeset viewer.