Index: src/wp-includes/rewrite.php
===================================================================
--- src/wp-includes/rewrite.php	(revision 32102)
+++ src/wp-includes/rewrite.php	(working copy)
@@ -248,9 +248,9 @@
  *
  * @param string $name Name of the endpoint.
  * @param int $places Endpoint mask describing the places the endpoint should be added.
- * @param string $query_var Name of the corresponding query variable. Defaults to $name.
+ * @param bool   $add_query_var Whether or not to register the query var. Default is true.
  */
-function add_rewrite_endpoint( $name, $places, $query_var = null ) {
+function add_rewrite_endpoint( $name, $places, $query_var = true ) {
 	global $wp_rewrite;
 	$wp_rewrite->add_endpoint( $name, $places, $query_var );
 }
@@ -1964,17 +1964,21 @@
 	 * @see add_rewrite_endpoint() for full documentation.
 	 * @uses WP::add_query_var()
 	 *
-	 * @param string $name      Name of the endpoint.
-	 * @param int    $places    Endpoint mask describing the places the endpoint should be added.
-	 * @param string $query_var Name of the corresponding query variable. Default is value of $name.
+	 * @param string $name          Name of the endpoint.
+	 * @param int    $places        Endpoint mask describing the places the endpoint should be added.
+	 * @param string $query_var     Name of the corresponding query variable. Default is value of $name.
 	 */
-	public function add_endpoint( $name, $places, $query_var = null ) {
+	public function add_endpoint( $name, $places, $query_var = true ) {
 		global $wp;
-		if ( null === $query_var ) {
+
+		if ( true === $query_var ) {
 			$query_var = $name;
 		}
 		$this->endpoints[] = array( $places, $name, $query_var );
-		$wp->add_query_var( $query_var );
+
+		if( $query_var ) {
+			$wp->add_query_var( $query_var );
+		}
 	}
 
 	/**
