Code Duplication    Length = 7-7 lines in 2 locations

class.jetpack.php 1 location

@@ 5101-5107 (lines=7) @@
5098
		add_action( 'pre_update_jetpack_option_register', array( 'Jetpack_Options', 'delete_option' ) );
5099
		$secrets = Jetpack::generate_secrets( 'register' );
5100
5101
		if (
5102
			empty( $secrets['secret_1'] ) ||
5103
			empty( $secrets['secret_2'] ) ||
5104
			empty( $secrets['exp'] )
5105
		) {
5106
			return new Jetpack_Error( 'missing_secrets' );
5107
		}
5108
5109
		// better to try (and fail) to set a higher timeout than this system
5110
		// supports than to have register fail for more users than it should

class.jetpack-network.php 1 location

@@ 437-443 (lines=7) @@
434
		// Save the secrets in the subsite so when the wpcom server does a pingback it
435
		// will be able to validate the connection
436
		$secrets = $jp->generate_secrets( 'register' );
437
		if (
438
			empty( $secrets['secret_1'] ) ||
439
			empty( $secrets['secret_2']  ) ||
440
			empty( $secrets['exp'] )
441
		) {
442
			return new Jetpack_Error( 'missing_secrets' );
443
		}
444
445
		// Gra info for gmt offset
446
		$gmt_offset = get_option( 'gmt_offset' );