Ticket #14330: php4-stands-and-elegant-url-array-fix.patch
| File php4-stands-and-elegant-url-array-fix.patch, 1.5 KB (added by loushou, 3 years ago) |
|---|
-
classes.php
274 274 $this->query_vars[$wpvar] = $perma_query_vars[$wpvar]; 275 275 276 276 if ( !empty( $this->query_vars[$wpvar] ) ) { 277 $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; 277 if ( ! is_array( $this->query_vars[$wpvar] ) ) { 278 $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; 279 } else { 280 foreach ( $this->query_vars[$wpvar] as $vkey => $v ) 281 $this->query_vars[$wpvar][$vkey] = (string) $v; 282 } 278 283 if ( isset( $taxonomy_query_vars[$wpvar] ) ) { 279 284 $this->query_vars['taxonomy'] = $taxonomy_query_vars[$wpvar]; 280 285 $this->query_vars['term'] = $this->query_vars[$wpvar]; … … 288 293 // Limit publicly queried post_types to those that are publicly_queryable 289 294 if ( isset( $this->query_vars['post_type']) ) { 290 295 $queryable_post_types = get_post_types( array('publicly_queryable' => true) ); 291 if ( ! in_array( $this->query_vars['post_type'], $queryable_post_types ) ) 292 unset( $this->query_vars['post_type'] ); 296 if (!is_array($this->query_vars['post_type'])) { 297 if ( ! in_array( $this->query_vars['post_type'], $queryable_post_types ) ) 298 unset( $this->query_vars['post_type'] ); 299 } else { 300 $this->query_vars['post_type'] = array_intersect( $this->query_vars['post_type'], $queryable_post_types ); 301 } 293 302 } 294 303 295 304 foreach ( (array) $this->private_query_vars as $var) {
