[wp-cvs] wordpress/wp-includes functions.php, 1.113,
1.114 template-functions-category.php, 1.32, 1.33
Ryan Boren
rboren at users.sourceforge.net
Sun Jun 6 02:22:00 CDT 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31496/wp-includes
Modified Files:
functions.php template-functions-category.php
Log Message:
Guard against empty $cat_counts array. http://wordpress.org/support/3/6080
Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.113
retrieving revision 1.114
diff -C2 -d -r1.113 -r1.114
*** functions.php 6 Jun 2004 02:02:27 -0000 1.113
--- functions.php 6 Jun 2004 07:21:58 -0000 1.114
***************
*** 1410,1414 ****
function query_posts($query) {
! global $wpdb, $pagenow, $request;
parse_str($query);
--- 1410,1414 ----
function query_posts($query) {
! global $wpdb, $pagenow, $request, $user_ID;
parse_str($query);
Index: template-functions-category.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-category.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** template-functions-category.php 4 Jun 2004 02:36:46 -0000 1.32
--- template-functions-category.php 6 Jun 2004 07:21:58 -0000 1.33
***************
*** 313,321 ****
WHERE post_status = 'publish' $exclusions
GROUP BY category_id");
! foreach ($cat_counts as $cat_count) {
! if (1 != intval($hide_empty) || $cat_count > 0) {
! $category_posts["$cat_count->cat_ID"] = $cat_count->cat_count;
! }
! }
}
--- 313,323 ----
WHERE post_status = 'publish' $exclusions
GROUP BY category_id");
! if (! empty($cat_counts)) {
! foreach ($cat_counts as $cat_count) {
! if (1 != intval($hide_empty) || $cat_count > 0) {
! $category_posts["$cat_count->cat_ID"] = $cat_count->cat_count;
! }
! }
! }
}
More information about the cvs
mailing list