From ef1593e6dab20a5817d185fbf92a5b3564212cdd Mon Sep 17 00:00:00 2001 From: markjaquith Date: Sun, 6 Dec 2009 18:01:01 +0000 Subject: [PATCH] Get rid of stray comma. fixes #10977. props kevinB git-svn-id: http://svn.automattic.com/wordpress/trunk@12327 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index d3fd44025..9b6efcdac 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -746,8 +746,9 @@ function wp_list_pages($args = '') { // sanitize, mostly to keep spaces out $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']); - // Allow plugins to filter an array of excluded pages - $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude']))); + // Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array) + $exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array(); + $r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) ); // Query pages. $r['hierarchical'] = 0;