Skip to content

Commit

Permalink
Merge pull request #10677 from fuzionnz/CRM-20885-suppress_fakefile_e…
Browse files Browse the repository at this point in the history
…rror

Suppress error if fakeFile cannot be created.
  • Loading branch information
monishdeb authored Aug 2, 2017
2 parents 4748a6b + 76ceb0c commit 245c62b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Utils/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public static function createFakeFile($dir, $contents = 'delete me', $fileName =
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;
}
Expand Down

0 comments on commit 245c62b

Please sign in to comment.