From 4e638f02fddc31e9ba01f70e1bffe0a23d2dd3ab Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 30 Nov 2008 19:29:46 +0000 Subject: [PATCH] Fix notice git-svn-id: http://svn.automattic.com/wordpress/trunk@9987 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 9a498b6464..70cc392746 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -109,12 +109,12 @@ function get_permalink($id = 0, $leavename = false) { $category = ''; if ( strpos($permalink, '%category%') !== false ) { $cats = get_the_category($post->ID); - if ( $cats ) + if ( $cats ) { usort($cats, '_usort_terms_by_ID'); // order by ID - $category = $cats[0]->slug; - if ( $parent=$cats[0]->parent ) - $category = get_category_parents($parent, false, '/', true) . $category; - + $category = $cats[0]->slug; + if ( $parent = $cats[0]->parent ) + $category = get_category_parents($parent, false, '/', true) . $category; + } // show default category in permalinks, without // having to assign it explicitly if ( empty($category) ) {