From dd1d1be2807d76c8e1892d06a6620011a09e641f Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sun, 6 Dec 2009 18:01:01 +0000 Subject: [PATCH] Get rid of stray comma. fixes #10977. props kevinB git-svn-id: https://develop.svn.wordpress.org/trunk@12327 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 d3fd440251..9b6efcdac3 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;