WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#18063 closed defect (bug)

When viewing category view an error is thrown — at Initial Version

Reported by: garyjob Owned by: Gary Teh
Milestone: Priority: normal
Severity: trivial Version: 3.1.4
Component: Query Keywords:
Focuses: Cc:

Description

This is the error


[Mon Jul 11 00:04:56 2011] [error] [client 127.0.0.1] PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in C:
applications
nubee
htdocs
wp-includes
query.php on line 2891, referer: http://wordpress_site/?category_name=game-zh-hans&lang=zh-hans&lang=zh-hans

This is the proposed fix


if(isset($queryterms? )){

$term = get_term_by( $queryfield?, reset( $queryterms? ), $querytaxonomy? );

}
else{

$term = get_term_by( $queryfield?, $queryterms? , $querytaxonomy? );

}

Change History (0)

Note: See TracTickets for help on using tickets.