From 76bc07fe3f4c13f1c1bd7c4cc5a484151dfe19d6 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 22 Dec 2005 04:31:48 +0000 Subject: [PATCH] Don't get children for cat 0. fixes #2123 git-svn-id: https://develop.svn.wordpress.org/trunk@3338 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-category.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index c39be277de..1858bec4f9 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -126,6 +126,9 @@ function get_category_parents($id, $link = FALSE, $separator = '/', $nicename = } function get_category_children($id, $before = '/', $after = '') { + if ( 0 == $id ) + return ''; + $cat_ids = get_all_category_ids(); foreach ( $cat_ids as $cat_id ) { if ( $cat_id == $id)