Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UploadedFile.php

function UploadedFile::validateActive

Throws

RuntimeException if is moved or not ok

2 calls to UploadedFile::validateActive()
UploadedFile::getStream in vendor/guzzlehttp/psr7/src/UploadedFile.php
Retrieve a stream representing the uploaded file.
UploadedFile::moveTo in vendor/guzzlehttp/psr7/src/UploadedFile.php
Move the uploaded file to a new location.

File

vendor/guzzlehttp/psr7/src/UploadedFile.php, line 137

Class

UploadedFile

Namespace

GuzzleHttp\Psr7

Code

private function validateActive() : void {
    if (false === $this->isOk()) {
        throw new RuntimeException('Cannot retrieve stream due to upload error');
    }
    if ($this->isMoved()) {
        throw new RuntimeException('Cannot retrieve stream after it has already been moved');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal