function FormUploadedFile::getError

Same name in other branches
  1. 9 core/modules/file/src/Upload/FormUploadedFile.php \Drupal\file\Upload\FormUploadedFile::getError()

Overrides UploadedFileInterface::getError

File

core/modules/file/src/Upload/FormUploadedFile.php, line 58

Class

FormUploadedFile
Provides a bridge to Symfony UploadedFile.

Namespace

Drupal\file\Upload

Code

public function getError() : int {
    @trigger_error(__METHOD__ . '() is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \\Drupal\\file\\Validation\\UploadedFileValidatorInterface::validate() instead. See https://www.drupal.org/node/3375456', E_USER_DEPRECATED);
    return $this->uploadedFile
        ->getError();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.