summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-12-10 18:10:28 +0100
committermsquare <msquare@notrademark.de>2017-12-10 18:10:28 +0100
commitdbf6e64a2cc0d83322d249da4844b5cf3b85bf60 (patch)
treeae8934c8878bb9dfc63f9103e3ef251eb4c51992 /includes/pages
parentcbe88ad8013f7459ad9a700b7a8791b54f1c76db (diff)
change write permission check to catch exceptions
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/admin_import.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php
index dcf4e0d1..b59f2b17 100644
--- a/includes/pages/admin_import.php
+++ b/includes/pages/admin_import.php
@@ -32,10 +32,11 @@ function admin_import()
$step = $request->input('step');
}
- if ($test_handle = @fopen($import_dir . '/tmp', 'w')) {
+ try {
+ $test_handle = @fopen($import_dir . '/tmp', 'w');
fclose($test_handle);
@unlink($import_dir . '/tmp');
- } else {
+ } catch(Exception $e) {
error(_('Webserver has no write-permission on import directory.'));
}