Skip to content
Snippets Groups Projects
Commit 2d8652f7 authored by Jaime Perez's avatar Jaime Perez
Browse files

Make file_put_contents silent when writing to a file. Capturing the return value should be enough.

parent 19608b41
Branches
Tags
No related merge requests found
...@@ -1948,7 +1948,7 @@ class SimpleSAML_Utilities { ...@@ -1948,7 +1948,7 @@ class SimpleSAML_Utilities {
$tmpFile = $filename . '.new.' . getmypid() . '.' . php_uname('n'); $tmpFile = $filename . '.new.' . getmypid() . '.' . php_uname('n');
$res = file_put_contents($tmpFile, $data); $res = @file_put_contents($tmpFile, $data);
if ($res === FALSE) { if ($res === FALSE) {
throw new SimpleSAML_Error_Exception('Error saving file ' . $tmpFile . throw new SimpleSAML_Error_Exception('Error saving file ' . $tmpFile .
': ' . SimpleSAML_Utilities::getLastError()); ': ' . SimpleSAML_Utilities::getLastError());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment