Ticket #3891: m_and_cat_problem_with_array_and_PHPGLOBAL.patch
| File m_and_cat_problem_with_array_and_PHPGLOBAL.patch, 1.6 kB (added by g30rg3x, 2 years ago) |
|---|
-
wp-includes/general-template.php
old new 189 189 } 190 190 191 191 // If there's a month 192 if ( !empty($m) ) {192 if ( (!empty($m)) && (!is_array($m)) ) { 193 193 $my_year = substr($m, 0, 4); 194 194 $my_month = $wp_locale->get_month($m); 195 195 $title = "$my_year $sep $my_month"; -
wp-includes/query.php
old new 507 507 $this->is_date = true; 508 508 } 509 509 510 if (empty($qv['cat']) || ($qv['cat'] == '0') ) {510 if (empty($qv['cat']) || ($qv['cat'] == '0') || (is_array($qv['cat']))) { 511 511 $this->is_category = false; 512 512 } else { 513 513 if (stristr($qv['cat'],'-')) { … … 704 704 $wp_posts_post_date_field = "post_date"; // "DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"; 705 705 706 706 // If a month is specified in the querystring, load that month 707 if ( ( int) $q['m']) {707 if ( ((int) $q['m']) && (!is_array($q['m'])) ) { 708 708 $q['m'] = '' . preg_replace('|[^0-9]|', '', $q['m']); 709 709 $where .= ' AND YEAR(post_date)=' . substr($q['m'], 0, 4); 710 710 if (strlen($q['m'])>5) … … 838 838 839 839 // Category stuff 840 840 841 if ((empty($q['cat'])) || ($q['cat'] == '0') || 841 if ((empty($q['cat'])) || ($q['cat'] == '0') || (is_array($q['cat'])) || 842 842 // Bypass cat checks if fetching specific posts 843 843 ( $this->is_single || $this->is_page )) { 844 844 $whichcat='';
