| @@ -43,14 +43,14 @@ | ||
| 43 | 43 | * @return void |
| 44 | 44 | */ |
| 45 | 45 | private function run_migration( ) { |
| 46 | 46 | // Must be a number. |
| 47 | - if ( ! isset( $_GET['site'] ) || ! is_scalar( $_GET['site'] ) || ! ctype_digit( (string) $_GET['site'] ) ) { | |
| 47 | + if ( !ctype_digit( $_GET['site'] ) ) { | |
| 48 | 48 | exit; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | // Site must be valid and exists. |
| 52 | - $site = function_exists( 'get_site' ) ? get_site( $_GET['site'] ) : null; | |
| 52 | + $site = get_site( $_GET['site'] ); | |
| 53 | 53 | if ( is_null( $site ) ) { |
| 54 | 54 | exit; |
| 55 | 55 | } |
| 56 | 56 | |