Ticket #3891: query.php.diff

File query.php.diff, 1.0 kB (added by g30rg3x, 2 years ago)

More General Fix and Possibly a Better Solution to the Defect.

  • wp-includes/query.php

    old new  
    392392                ); 
    393393 
    394394                foreach ($keys as $key) { 
    395                         if ( !isset($array[$key])
     395                        if ( (!isset($array[$key])) || (is_array($array[$key]))
    396396                                $array[$key] = ''; 
    397397                } 
    398398 
     
    507507                                $this->is_date = true; 
    508508                        } 
    509509 
    510                         if (empty($qv['cat']) || ($qv['cat'] == '0')) { 
     510                        if (empty($qv['cat']) || ($qv['cat'] == '0') || (is_array($qv['cat']))) { 
    511511                                $this->is_category = false; 
    512512                        } else { 
    513513                                if (stristr($qv['cat'],'-')) { 
     
    838838 
    839839                // Category stuff 
    840840 
    841                 if ((empty($q['cat'])) || ($q['cat'] == '0') || 
     841                if ((empty($q['cat'])) || ($q['cat'] == '0') || (is_array($q['cat'])) || 
    842842                                // Bypass cat checks if fetching specific posts 
    843                                 ( $this->is_single || $this->is_page ))
     843                                ( $this->is_single || $this->is_page ))  
    844844                        $whichcat=''; 
    845845                } else { 
    846846                        $q['cat'] = ''.urldecode($q['cat']).'';