Index: src/wp-includes/query.php
===================================================================
--- src/wp-includes/query.php	(revision 28247)
+++ src/wp-includes/query.php	(working copy)
@@ -3861,7 +3861,7 @@
 
 		$category = (array) $category;
 
-		if ( in_array( $cat_obj->term_id, $category ) )
+		if ( in_array( $cat_obj->term_id, $category, true ) )
 			return true;
 		elseif ( in_array( $cat_obj->name, $category ) )
 			return true;
@@ -3893,7 +3893,7 @@
 
 		$tag = (array) $tag;
 
-		if ( in_array( $tag_obj->term_id, $tag ) )
+		if ( in_array( $tag_obj->term_id, $tag, true ) )
 			return true;
 		elseif ( in_array( $tag_obj->name, $tag ) )
 			return true;
Index: tests/phpunit/tests/query/conditionals.php
===================================================================
--- tests/phpunit/tests/query/conditionals.php	(revision 28247)
+++ tests/phpunit/tests/query/conditionals.php	(working copy)
@@ -722,4 +722,48 @@
 		$this->assertTrue( is_attachment( $post->post_title ) );
 		$this->assertTrue( is_attachment( $post->post_name ) );
 	}
+
+	/**
+	 * @ticket 10663
+	 */
+	function test_is_category() {
+		$post_id = $this->factory->post->create();
+		$cat_id = $this->factory->category->create( array( 'name' => 'News' ) );
+		wp_set_post_categories( $post_id, $cat_id );
+
+		$this->go_to( "/?cat=$cat_id" );
+
+		$this->assertQueryTrue( 'is_category', 'is_archive'  );
+		$this->assertTrue( is_numeric( $cat_id ) );
+		$this->assertTrue( is_category( $cat_id ) );
+		$this->assertTrue( is_numeric( "$cat_id") );
+		$this->assertTrue( is_category( "$cat_id" ) );
+
+		$this->assertFalse( is_numeric( "{$cat_id}eth release" ) );
+		$this->assertFalse( is_category( "{$cat_id}eth release" ) );
+		$this->assertFalse( is_category( "{$cat_id}eth" ) );
+		$this->assertFalse( is_category( "{$cat_id} of a kind" ) );
+	}
+
+	/**
+	 * @ticket 10663
+	 */
+	function test_is_tag() {
+		$post_id = $this->factory->post->create();
+		$tag_id = $this->factory->tag->create( array( 'name' => 'News' ) );
+		wp_set_post_tags( $post_id, $tag_id );
+
+		$this->go_to( "/?tag=$tag_id" );
+
+		$this->assertQueryTrue( 'is_tag', 'is_archive'  );
+		$this->assertTrue( is_numeric( $tag_id ) );
+		$this->assertTrue( is_tag( $tag_id ) );
+		$this->assertTrue( is_numeric( "$tag_id") );
+		$this->assertTrue( is_tag( "$tag_id" ) );
+
+		$this->assertFalse( is_numeric( "{$tag_id}eth release" ) );
+		$this->assertFalse( is_tag( "{$tag_id}eth release" ) );
+		$this->assertFalse( is_tag( "{$tag_id}eth" ) );
+		$this->assertFalse( is_tag( "{$tag_id} of a kind" ) );
+	}
 }
