\Drupal::messenger()->addError(t('The file %filename could not be uploaded because the name is invalid.',['%filename'=>$uploaded_file->getClientOriginalName()]));
$files[$i]=FALSE;
}
catch(LockAcquiringException$e){
\Drupal::messenger()->addError(t('File already locked for writing.'));
@trigger_error('Calling '.__METHOD__.'() without the $lock argument is deprecated in drupal:10.3.0 and is required in drupal:11.0.0. See https://www.drupal.org/node/3389017',E_USER_DEPRECATED);
$this->lock=\Drupal::service('lock');
}
}
/**
@@ -170,6 +190,8 @@ public function __construct(FileSystemInterface $fileSystem, EntityTypeManagerIn
* Thrown when a file system error occurs and $throws is TRUE.