Make WordPress Core

Changeset 57391


Ignore:
Timestamp:
01/30/2024 02:25:41 PM (8 months ago)
Author:
jorbin
Message:

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

Merges [57389] to 6.4 branch.

Props xknown, peterwilsoncc, jorbin, desrosj.

Location:
branches/6.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4

  • branches/6.4/src/wp-admin/includes/schema.php

    r56657 r57391  
    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.