Skip to content
Snippets Groups Projects
Commit 193f3308 authored by Sandipta Sardar's avatar Sandipta Sardar Committed by Aaron Bauman
Browse files

Issue #3404815 by sandipta: Remove Deprecated function file_save_data() from...

Issue #3404815 by sandipta: Remove Deprecated function  file_save_data() from Salesforce Example modules for Drupal 10 compatibility
parent 91b3bb49
No related branches found
Tags 7.x-1.0-alpha7
No related merge requests found
Pipeline #85569 canceled
......@@ -194,7 +194,7 @@ class SalesforceExampleSubscriber implements EventSubscriberInterface {
// Attach the new file id to the user entity.
/* var \Drupal\file\FileInterface */
if ($file = file_save_data($file_data, $destination, FileSystemInterface::EXISTS_REPLACE)) {
if ($file = \Drupal::service('file.repository')->writeData($file_data, $destination, FileSystemInterface::EXISTS_REPLACE)) {
$account->user_picture->target_id = $file->id();
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment