diff --git a/src/Utils.php b/src/Utils.php index f4e48640..6b6c8cce 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -317,7 +317,8 @@ public static function streamFor($resource = '', array $options = []) * The 'php://input' is a special stream with quirks and inconsistencies. * We avoid using that stream by reading it into php://temp */ - if (\stream_get_meta_data($resource)['uri'] === 'php://input') { + $metaData = \stream_get_meta_data($resource); + if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') { $stream = self::tryFopen('php://temp', 'w+'); fwrite($stream, stream_get_contents($resource)); fseek($stream, 0);