diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 69f9a1d9..fa88156c 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -18,7 +18,7 @@ if (!$error && $_POST) { : "compress.bzip2://adminer.sql.bz2" )), "rb"); $query = ($fp ? fread($fp, 1e6) : false); - } elseif ($_FILES["sql_file"]["error"] != 4) { // 4 - UPLOAD_ERR_NO_FILE + } elseif ($_FILES["sql_file"] && $_FILES["sql_file"]["error"] != 4) { // 4 - UPLOAD_ERR_NO_FILE $query = get_file("sql_file", true); } if (is_string($query)) { // get_file() returns error as number, fread() as false @@ -126,9 +126,11 @@ if (!$error && $_POST) { echo "
" . upload_error($query) . "\n"; } } + +$uploads = ini_bool("file_uploads"); ?> -