diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-09-04 12:34:33 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-09-04 12:34:33 +0000 |
commit | 43766122f137dfab23138fa2ae3f9b8f592c7025 (patch) | |
tree | ba0d4a9bfcc05e3232df4bfeb0ae5957985b3c20 | |
parent | d925853f3cc85f5ba4a5aafa6be71382346a5fd3 (diff) | |
download | pkgsubmit-43766122f137dfab23138fa2ae3f9b8f592c7025.tar pkgsubmit-43766122f137dfab23138fa2ae3f9b8f592c7025.tar.gz pkgsubmit-43766122f137dfab23138fa2ae3f9b8f592c7025.tar.bz2 pkgsubmit-43766122f137dfab23138fa2ae3f9b8f592c7025.tar.xz pkgsubmit-43766122f137dfab23138fa2ae3f9b8f592c7025.zip |
check for upload_dir before using it
-rw-r--r-- | test_index.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test_index.php b/test_index.php index 216fadf..292e5a3 100644 --- a/test_index.php +++ b/test_index.php @@ -29,6 +29,13 @@ error_reporting(E_ALL); require __DIR__ . '/conf.php'; require __DIR__ . '/lib.php'; +// sanity checks +if (!is_dir($upload_dir)) { + $msg = "$upload_dir does not exist on this system. Please check your config."; + error_log($msg); + die($msg); +} + $g_user = isset($_GET['user']) ? htmlentities(strip_tags($_GET['user'])) : null; if ($g_user) { |