Changes between Version 1 and Version 2 of Ticket #18063
- Timestamp:
- 07/11/2011 01:51:11 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #18063 – Description
v1 v2 1 1 This is the error 2 2 ----------------------------------- 3 [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 3 `[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` 4 4 5 5 This is the proposed fix: 6 6 7 7 {{{ 8 9 10 11 12 13 8 if(isset($query['terms'] )){ 9 $term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] ); 10 } 11 else{ 12 $term = get_term_by( $query['field'], $query['terms'] , $query['taxonomy'] ); 13 } 14 14 }}}