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.')); }