diff --git a/wp-db-backup.php b/wp-db-backup.php index eb23d0b..e5e3576 100755 --- a/wp-db-backup.php +++ b/wp-db-backup.php @@ -109,7 +109,10 @@ function __construct() { } } - $requested_temp_dir = sanitize_text_field($_GET['wp_db_temp_dir']); + $requested_temp_dir = ''; + if (array_key_exists('wp_db_temp_dir', $_GET)) { + $requested_temp_dir = sanitize_text_field($_GET['wp_db_temp_dir']); + } $this->backup_dir = trailingslashit(apply_filters('wp_db_b_backup_dir', (isset($requested_temp_dir) && is_writable($requested_temp_dir)) ? $requested_temp_dir : get_temp_dir())); $this->basename = 'wp-db-backup';