﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
21967	"""Passed variable is not an array or object"" in WP_Query::get_queried_object()"	onetarek	wonderboymusic	"Today I found following warning message by wordpress/PHP [[BR]]


{{{
[22-Sep-2012 11:00:16] PHP Warning:  reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in /home/..../public_html/wp-includes/query.php on line 2971
}}}
 [[BR]]

This warning is not occurred for every page visit/query. But it is huge in my error_log.
I opened wp-includes/query.php on line 2971 and found this line '''
{{{
$term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] );
}}}
''' [[BR]]
in some case this variable 
{{{
$query['terms']
}}}
 is not an object/array.
Now wordpress should check whether this var is an object/array or not before reset() that.



 "	defect (bug)	closed	low	3.5	Query	3.4.2	minor	fixed	has-patch commit	onetarek asif2bd@…
