[wp-trac] [WordPress Trac] #29736: Proposal to check for is_scalar() in WP_Query::fill_query_vars()

WordPress Trac noreply at wordpress.org
Wed Sep 24 11:56:57 UTC 2014


#29736: Proposal to check for is_scalar() in WP_Query::fill_query_vars()
-------------------------+------------------------------
 Reporter:  tivnet       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Query        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by tivnet):

 Of course, `isset` or `! empty` should be checked before `is_scalar`, for
 example:
 {{{
 #!php
 if ( isset( $query_args->query_vars['s'] ) && ! is_scalar(
 $query_args->query_vars['s'] ) ) {
         $query_args->query_vars['s'] = '';
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29736#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list