Code Duplication    Length = 6-6 lines in 2 locations

includes/payments/class-give-payment.php 2 locations

@@ 1307-1312 (lines=6) @@
1304
		$meta = apply_filters( "give_get_payment_meta_{$meta_key}", $meta, $this->ID );
1305
1306
		// Security check.
1307
		if ( is_serialized( $meta ) ) {
1308
			preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $meta, $matches );
1309
			if ( ! empty( $matches ) ) {
1310
				$meta = array();
1311
			}
1312
		}
1313
1314
		/**
1315
		 * Filter the all meta keys.
@@ 1686-1691 (lines=6) @@
1683
1684
		$user_info = isset( $this->payment_meta['user_info'] ) ? $this->payment_meta['user_info'] : array();
1685
1686
		if ( is_serialized( $user_info ) ) {
1687
			preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $user_info, $matches );
1688
			if ( ! empty( $matches ) ) {
1689
				$user_info = array();
1690
			}
1691
		}
1692
1693
		$user_info = wp_parse_args( $user_info, $defaults );
1694