mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
There is no $oConfig, guessing it's Api::Config() here
This commit is contained in:
parent
4bbe93aea7
commit
a41aac28d3
1 changed files with 2 additions and 2 deletions
|
|
@ -156,14 +156,14 @@ class Utils
|
|||
public static function saveFile(string $filename, string $data) : void
|
||||
{
|
||||
$dir = \dirname($filename);
|
||||
if (!\is_dir($dir) && !\mkdir($dir, intval($oConfig->Get('security', 'dir_permissions')), true)) {
|
||||
if (!\is_dir($dir) && !\mkdir($dir, intval(Api::Config()->Get('security', 'dir_permissions')), true)) {
|
||||
throw new \RuntimeException('Failed to create directory "'.$dir.'"');
|
||||
}
|
||||
if (false === \file_put_contents($filename, $data)) {
|
||||
throw new \RuntimeException('Failed to save file "'.$filename.'"');
|
||||
}
|
||||
\clearstatcache();
|
||||
\chmod($filename, intval($oConfig->Get('security', 'file_permissions')));
|
||||
\chmod($filename, intval(Api::Config()->Get('security', 'file_permissions')));
|
||||
/*
|
||||
try {
|
||||
} catch (\Throwable $oException) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue