diff options
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-x | lib/private/util.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 8aa7a074d0d..0585749d615 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -788,8 +788,12 @@ class OC_Util { } $fp = @fopen($testFile, 'w'); - @fwrite($fp, $testContent); - @fclose($fp); + if (!$fp) { + throw new OC\HintException('Can\'t create test file to check for working .htaccess file.', + 'Make sure it is possible for the webserver to write to '.$testFile); + } + fwrite($fp, $testContent); + fclose($fp); // accessing the file via http $url = OC_Helper::makeURLAbsolute(OC::$WEBROOT.'/data'.$fileName); |