From e073b077b482d25545bd36dec9c1d4a83b85845a Mon Sep 17 00:00:00 2001 From: Bennett McElwee Date: Mon, 26 Mar 2018 14:45:06 +1300 Subject: [PATCH] Fix warning if wp_db_temp_dir undefined --- wp-db-backup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-db-backup.php b/wp-db-backup.php index eb23d0b..2646271 100755 --- a/wp-db-backup.php +++ b/wp-db-backup.php @@ -109,7 +109,7 @@ function __construct() { } } - $requested_temp_dir = sanitize_text_field($_GET['wp_db_temp_dir']); + $requested_temp_dir = isset($_GET['wp_db_temp_dir']) ? sanitize_text_field($_GET['wp_db_temp_dir']) : null; $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';