From 2a6ef420175b3d1ee8b3fe6a3dbf9e90ab846829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Fri, 24 Oct 2014 20:28:11 +0200 Subject: [PATCH] suppress warnings --- core/Maps/MapManager.php | 2 +- core/Update/PluginUpdateManager.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/Maps/MapManager.php b/core/Maps/MapManager.php index 90dd2aab..777703b6 100644 --- a/core/Maps/MapManager.php +++ b/core/Maps/MapManager.php @@ -404,7 +404,7 @@ class MapManager implements CallbackListener { return; } - if (!file_put_contents($fullMapFileName, $file)) { + if (!@file_put_contents($fullMapFileName, $file)) { // Save error $this->maniaControl->getChat()->sendError('Saving map failed!', $login); return; diff --git a/core/Update/PluginUpdateManager.php b/core/Update/PluginUpdateManager.php index 45f85321..fac7e144 100644 --- a/core/Update/PluginUpdateManager.php +++ b/core/Update/PluginUpdateManager.php @@ -265,7 +265,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis $tempDir = FileUtil::getTempFolder(); $updateFileName = $tempDir . $pluginUpdateData->zipfile; - $bytes = file_put_contents($updateFileName, $updateFileContent); + $bytes = @file_put_contents($updateFileName, $updateFileContent); if (!$bytes || $bytes <= 0) { $message = "Plugin {$actionNoun} failed: Couldn't save {$actionNoun} Zip!"; if ($player) { @@ -288,7 +288,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis $zip->extractTo(MANIACONTROL_PATH . 'plugins' . DIRECTORY_SEPARATOR); $zip->close(); - unlink($updateFileName); + @unlink($updateFileName); FileUtil::deleteTempFolder(); $messageExtra = '';