From a191df007e2260e1a58f96bf1af9eaa679fd4080 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 27 Jan 2006 19:22:55 +0000 Subject: [PATCH] Make sure we have an array. Props David House. fixes #2344 git-svn-id: http://svn.automattic.com/wordpress/trunk@3489 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index aa9053dac7..480087a922 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -460,7 +460,7 @@ AND meta_key = '$key'"); $wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = '$post_id' AND meta_key = '$key' AND meta_value = '$value'"); $cache_key = $post_meta_cache['$post_id'][$key]; - foreach ( $cache_key as $index => $data ) + if ($cache_key) foreach ( $cache_key as $index => $data ) if ( $data == $value ) unset($post_meta_cache['$post_id'][$key][$index]); }