From: Chris Burgess Date: Sun, 16 Jul 2017 22:30:55 +0000 (+1200) Subject: Suppress error if fakeFile cannot be created. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=76ceb0c493d18af0b9038c61b8d8fd6b2637f4a4;p=civicrm-core.git Suppress error if fakeFile cannot be created. CRM-20885 --- diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index f377b742cd..85d54e9e44 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -303,7 +303,7 @@ class CRM_Utils_File { if (!$fileName) { $fileName = 'delete-this-' . CRM_Utils_String::createRandom(10, CRM_Utils_String::ALPHANUMERIC); } - $success = file_put_contents($dir . $fileName, $contents); + $success = @file_put_contents($dir . $fileName, $contents); return ($success === FALSE) ? FALSE : $fileName; }