From fb04390c0198f684e6655de6da4038df0440a60c Mon Sep 17 00:00:00 2001 From: westi Date: Tue, 22 Dec 2009 17:05:49 +0000 Subject: [PATCH] Use maybe_unserialized on all post_meta values on import to ensure we don't end up with double serialized data in the database. Fixes #10619 props znarfor. git-svn-id: http://svn.automattic.com/wordpress/trunk@12495 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/import/wordpress.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 7723260673..dae2e8af2e 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -605,7 +605,9 @@ class WP_Import { $key = $this->get_tag( $p, 'wp:meta_key' ); $value = $this->get_tag( $p, 'wp:meta_value' ); $value = stripslashes($value); // add_post_meta() will escape. - + // get_post_meta would have done this but we read straight from the db on export so we could have a serialized string + $value = maybe_unserialize($value); + $this->process_post_meta($post_id, $key, $value); } }