You are here

private function UploadedFile::validateActive in Lockr 7.3

Throws

RuntimeException if is moved or not ok

2 calls to UploadedFile::validateActive()
UploadedFile::getStream in vendor/guzzlehttp/psr7/src/UploadedFile.php
UploadedFile::moveTo in vendor/guzzlehttp/psr7/src/UploadedFile.php

File

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

Class

UploadedFile

Namespace

GuzzleHttp\Psr7

Code

private function validateActive() {
  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');
  }
}