log irgendwas
This commit is contained in:
@@ -4895,7 +4895,7 @@ SQL;
|
||||
|
||||
private function debugDir(): string
|
||||
{
|
||||
return dirname(__DIR__) . '/debug';
|
||||
return rtrim(sys_get_temp_dir(), '/') . '/emailtemplate_debug';
|
||||
}
|
||||
|
||||
private function writeDebugLog(string $name, array $payload): void
|
||||
@@ -4917,12 +4917,14 @@ SQL;
|
||||
}
|
||||
$dir = $this->debugDir();
|
||||
if (!is_dir($dir)) {
|
||||
@mkdir($dir, 0775, true);
|
||||
@mkdir($dir, 0777, true);
|
||||
}
|
||||
@chmod($dir, 0777);
|
||||
$safeName = preg_replace('/[^a-zA-Z0-9_\.\-]/', '_', $name) ?: 'debug';
|
||||
$file = rtrim($dir, '/') . '/' . $safeName . '.log';
|
||||
$data = json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
|
||||
@file_put_contents($file, $data ?: '');
|
||||
@chmod($file, 0666);
|
||||
|
||||
$fallback = sys_get_temp_dir() . '/emailtemplate_debug.log';
|
||||
$line = json_encode([
|
||||
|
||||
Reference in New Issue
Block a user