[wp-trac] [WordPress Trac] #16472: set_query_var() / get_query_var() does not work for NULL values

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 6 16:08:06 UTC 2011


#16472: set_query_var() / get_query_var() does not work for NULL values
--------------------------+-----------------------------
 Reporter:  hakre         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 Setting a query var to NULL will convert it into an empty string:

 {{{
 $name = 'test';
 $value = NULL;
 set_query_var($name, $value);
 $get = get_query_var($name);
 echo $value === $get ? 'same' : 'different';
 var_dump($get);
 }}}

 This will output "different" and showing that the query var now is an
 empty string.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16472>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list