| @@ 4918-4924 (lines=7) @@ | ||
| 4915 | } |
|
| 4916 | ||
| 4917 | // Jetpack ID error block |
|
| 4918 | if ( empty( $registration_response->jetpack_id ) ) { |
|
| 4919 | return new Jetpack_Error( 'jetpack_id', sprintf( __( 'Error Details: Jetpack ID is empty. Do not publicly post this error message! %s', 'jetpack' ), $entity ), $entity ); |
|
| 4920 | } elseif ( ! is_scalar( $registration_response->jetpack_id ) ) { |
|
| 4921 | return new Jetpack_Error( 'jetpack_id', sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ) , $entity ), $entity ); |
|
| 4922 | } elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
|
| 4923 | return new Jetpack_Error( 'jetpack_id', sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ) , $entity ), $entity ); |
|
| 4924 | } |
|
| 4925 | ||
| 4926 | return $registration_response; |
|
| 4927 | } |
|
| @@ 737-755 (lines=19) @@ | ||
| 734 | } |
|
| 735 | ||
| 736 | // Jetpack ID error block. |
|
| 737 | if ( empty( $registration_response->jetpack_id ) ) { |
|
| 738 | return new \WP_Error( |
|
| 739 | 'jetpack_id', |
|
| 740 | /* translators: %s is an error message string */ |
|
| 741 | sprintf( __( 'Error Details: Jetpack ID is empty. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
| 742 | $entity |
|
| 743 | ); |
|
| 744 | } elseif ( ! is_scalar( $registration_response->jetpack_id ) ) { |
|
| 745 | return new \WP_Error( |
|
| 746 | 'jetpack_id', |
|
| 747 | /* translators: %s is an error message string */ |
|
| 748 | sprintf( __( 'Error Details: Jetpack ID is not a scalar. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
| 749 | $entity |
|
| 750 | ); |
|
| 751 | } elseif ( preg_match( '/[^0-9]/', $registration_response->jetpack_id ) ) { |
|
| 752 | return new \WP_Error( |
|
| 753 | 'jetpack_id', |
|
| 754 | /* translators: %s is an error message string */ |
|
| 755 | sprintf( __( 'Error Details: Jetpack ID begins with a numeral. Do not publicly post this error message! %s', 'jetpack' ), $entity ), |
|
| 756 | $entity |
|
| 757 | ); |
|
| 758 | } |
|