Index: src/wp-includes/general-template.php
===================================================================
--- src/wp-includes/general-template.php	(revision 27754)
+++ src/wp-includes/general-template.php	(working copy)
@@ -1983,10 +1983,10 @@
  * It is possible to add query vars to the link by using the 'add_args' argument
  * and see {@link add_query_arg()} for more information.
  *
- * The 'before_page_number' and 'after_page_number' arguments allow users to 
+ * The 'before_page_number' and 'after_page_number' arguments allow users to
  * augment the links themselves. Typically this might be to add context to the
  * numbered links so that screen reader users understand what the links are for.
- * The text strings are added before and after the page number - within the 
+ * The text strings are added before and after the page number - within the
  * anchor tag.
  *
  * @since 2.1.0
@@ -2028,10 +2028,10 @@
 	$page_links = array();
 	$n = 0;
 	$dots = false;
+	$base = str_replace( '%_%', $format, $base );
 
 	if ( $prev_next && $current && 1 < $current ) :
-		$link = str_replace('%_%', 2 == $current ? '' : $format, $base);
-		$link = str_replace('%#%', $current - 1, $link);
+		$link = str_replace( '%#%', $current - 1, $base );
 		if ( $add_args )
 			$link = add_query_arg( $add_args, $link );
 		$link .= $add_fragment;
@@ -2043,8 +2043,7 @@
 			$dots = true;
 		else :
 			if ( $show_all || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) :
-				$link = str_replace('%_%', 1 == $n ? '' : $format, $base);
-				$link = str_replace('%#%', $n, $link);
+				$link = str_replace( '%#%', $n, $base );
 				if ( $add_args )
 					$link = add_query_arg( $add_args, $link );
 				$link .= $add_fragment;
@@ -2057,8 +2056,7 @@
 		endif;
 	endfor;
 	if ( $prev_next && $current && ( $current < $total || -1 == $total ) ) :
-		$link = str_replace('%_%', $format, $base);
-		$link = str_replace('%#%', $current + 1, $link);
+		$link = str_replace( '%#%', $current + 1, $base );
 		if ( $add_args )
 			$link = add_query_arg( $add_args, $link );
 		$link .= $add_fragment;
Index: tests/phpunit/tests/general/template.php
===================================================================
--- tests/phpunit/tests/general/template.php	(revision 27754)
+++ tests/phpunit/tests/general/template.php	(working copy)
@@ -28,4 +28,19 @@
 		remove_filter( 'number_format_i18n', array( $this, 'increment_i18n_count' ) );
 	}
 
+	/**
+	 * @ticket 24606
+	 */
+	function test_paginate_links_base_value() {
+		$links = paginate_links( array(
+			'current'  => 2,
+			'total'    => 5,
+			'end_size' => 1,
+			'mid_size' => 1,
+			'type'     => 'array',
+		) );
+
+		$this->assertTag( array( 'attributes' => array( 'href' => '?page=1' ) ), $links[0] );
+		$this->assertTag( array( 'attributes' => array( 'href' => '?page=1' ) ), $links[1] );
+	}
 }
