diff options
author | msquare <msquare@notrademark.de> | 2017-12-10 18:10:28 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2017-12-10 18:10:28 +0100 |
commit | dbf6e64a2cc0d83322d249da4844b5cf3b85bf60 (patch) | |
tree | ae8934c8878bb9dfc63f9103e3ef251eb4c51992 /includes | |
parent | cbe88ad8013f7459ad9a700b7a8791b54f1c76db (diff) |
change write permission check to catch exceptions
Diffstat (limited to 'includes')
-rw-r--r-- | includes/pages/admin_import.php | 5 |
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.')); } |