Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions stack/cas/connector.server.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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));
}
}

Expand Down
6 changes: 3 additions & 3 deletions stack/cas/connector.server_proxy.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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));
}
}

Expand Down
2 changes: 1 addition & 1 deletion stack/cas/installhelper.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
}
Expand Down
Loading