WordPress.org

Make WordPress Core

Ticket #14645: maybe_serialize.14645.diff

File maybe_serialize.14645.diff, 607 bytes (added by scribu, 4 years ago)
  • wp-includes/classes.php

     
    599599                $i = 0; 
    600600                foreach ( $meta_query as $q ) { 
    601601                        $meta_key = isset( $q['key'] ) ? trim( $q['key'] ) : ''; 
    602                         $meta_value = isset( $q['value'] ) ? $q['value'] : ''; 
     602                        $meta_value = isset( $q['value'] ) ? maybe_serialize( $q['value'] ) : ''; 
    603603                        $meta_compare = isset( $q['compare'] ) ? strtoupper( $q['compare'] ) : '='; 
    604604                        $meta_type = isset( $q['type'] ) ? strtoupper( $q['type'] ) : 'CHAR'; 
    605605