Make WordPress Core

Changeset 4418


Ignore:
Timestamp:
10/24/2006 09:14:47 AM (18 years ago)
Author:
markjaquith
Message:

unserialize serialized strings for ajax custom field addition. fixes #2591

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r4417 r4418  
    11081108    $mid = (int) $mid;
    11091109
    1110     return $wpdb->get_row("SELECT * FROM $wpdb->postmeta WHERE meta_id = '$mid'");
     1110    $meta = $wpdb->get_row("SELECT * FROM $wpdb->postmeta WHERE meta_id = '$mid'");
     1111    if ( is_serialized_string($meta->meta_value) )
     1112        $meta->meta_value = maybe_unserialize($meta->meta_value);
     1113    return $meta;
    11111114}
    11121115
Note: See TracChangeset for help on using the changeset viewer.