diff --git a/stack/cas/connector.server.class.php b/stack/cas/connector.server.class.php index b8c33a1dcf9..7ca3e69b52e 100644 --- a/stack/cas/connector.server.class.php +++ b/stack/cas/connector.server.class.php @@ -69,8 +69,8 @@ protected function call_maxima($command) { // Did we get files? if (strpos(curl_getinfo($request, CURLINFO_CONTENT_TYPE), "text/plain") === false) { // We have to save the zip file on local disk before opening. - $ziptemp = tempnam($CFG->dataroot . '/stack/tmp/', 'zip'); - file_put_contents($ziptemp, $ret); + $ziptemp = @tempnam($CFG->dataroot . '/stack/tmp/', 'zip'); + @file_put_contents($ziptemp, $ret); // Loop over the contents of the zip. $zip = new ZipArchive(); @@ -85,7 +85,7 @@ protected function call_maxima($command) { } else { // Otherwise this is a plot. $filename = $CFG->dataroot . "/stack/plots/" . $filenameinzip; - file_put_contents($filename, $zip->getFromIndex($i)); + @file_put_contents($filename, $zip->getFromIndex($i)); } } diff --git a/stack/cas/connector.server_proxy.class.php b/stack/cas/connector.server_proxy.class.php index 8bafacde45d..7aa27de1d92 100644 --- a/stack/cas/connector.server_proxy.class.php +++ b/stack/cas/connector.server_proxy.class.php @@ -94,8 +94,8 @@ protected function call_maxima($command) { // Did we get files? if (strpos(curl_getinfo($request, CURLINFO_CONTENT_TYPE), "text/plain") === false) { // We have to save the zip file on local disk before opening. - $ziptemp = tempnam($CFG->dataroot . '/stack/tmp/', 'zip'); - file_put_contents($ziptemp, $ret); + $ziptemp = @tempnam($CFG->dataroot . '/stack/tmp/', 'zip'); + @file_put_contents($ziptemp, $ret); // Loop over the contents of the zip. $zip = new ZipArchive(); @@ -110,7 +110,7 @@ protected function call_maxima($command) { } else { // Otherwise this is a plot. $filename = $CFG->dataroot . "/stack/plots/" . $filenameinzip; - file_put_contents($filename, $zip->getFromIndex($i)); + @file_put_contents($filename, $zip->getFromIndex($i)); } } diff --git a/stack/cas/installhelper.class.php b/stack/cas/installhelper.class.php index 94b2196a7f0..71c54330dbe 100644 --- a/stack/cas/installhelper.class.php +++ b/stack/cas/installhelper.class.php @@ -219,7 +219,7 @@ public static function create_maximalocal() { make_upload_directory('stack/plots'); make_upload_directory('stack/tmp'); - if (!file_put_contents(self::maximalocal_location(), self::generate_maximalocal_contents())) { + if (!@file_put_contents(self::maximalocal_location(), self::generate_maximalocal_contents())) { throw new stack_exception('Failed to write Maxima configuration file.'); } }