Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 18756)
+++ wp-includes/query.php	(working copy)
@@ -1731,9 +1731,9 @@
 
 		// Category stuff
 		if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular && $this->query_vars_changed ) {
-			$q['cat'] = ''.urldecode($q['cat']).'';
-			$q['cat'] = addslashes_gpc($q['cat']);
-			$cat_array = preg_split('/[,\s]+/', $q['cat']);
+			$q['cat'] = urldecode( (string) $q['cat'] );
+			$q['cat'] = addslashes_gpc( $q['cat'] );
+			$cat_array = preg_split( '/[,\s]+/', $q['cat'] );
 			$q['cat'] = '';
 			$req_cats = array();
 			foreach ( (array) $cat_array as $cat ) {
@@ -2273,8 +2273,8 @@
 		if ( empty($q['author']) || ($q['author'] == '0') ) {
 			$whichauthor = '';
 		} else {
-			$q['author'] = (string)urldecode($q['author']);
-			$q['author'] = addslashes_gpc($q['author']);
+			$q['author'] = urldecode( (string) $q['author'] );
+			$q['author'] = addslashes_gpc( $q['author'] );
 			if ( strpos($q['author'], '-') !== false ) {
 				$eq = '!=';
 				$andor = 'AND';
@@ -2335,8 +2335,8 @@
 				$allowed_keys[] = 'meta_value';
 				$allowed_keys[] = 'meta_value_num';
 			}
-			$q['orderby'] = urldecode($q['orderby']);
-			$q['orderby'] = addslashes_gpc($q['orderby']);
+			$q['orderby'] = urldecode( (string) $q['orderby'] );
+			$q['orderby'] = addslashes_gpc( $q['orderby'] );
 
 			$orderby_array = array();
 			foreach ( explode( ' ', $q['orderby'] ) as $i => $orderby ) {
