aws / aws/aws-sdk-php

fprintf(): supplied resource is not a valid stream resource

Open
#2,856 12 comments 0 reactions 1 assignee Claimed by @stobrien89 View on GitHub
bug investigating p2 queued
Dominant language
PHP
Stars
6.2k
Forks
1.3k
Avg merge
2h 53m
Merged PRs (30d)
7

Description

### Describe the bug

After fix #2855
new error if Aws\S3\S3Client created with debug with logfn

Uncaught Exception fprintf(): supplied resource is not a valid stream resource
Stack trace: #0
/project/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php(514): fprintf(Resource id #637, '<%s> [%s] ', 'GET https://tes...', 'PROGRESS')
#1 [internal function]: GuzzleHttp\Handler\StreamHandler->GuzzleHttp\Handler\{closure}(7, 0, NULL, 0, 7671, 73602)
#2
/project/vendor/guzzlehttp/psr7/src/Stream.php(228): fread(Resource id #642, 8192)
#3
/project/vendor/aws/aws-sdk-php/src/S3/StreamWrapper.php(209): GuzzleHttp\Psr7\Stream->read(8192)
#4 [internal function]: Aws\S3\StreamWrapper->stream_read(8192)
#5
/project/vendor/symfony/filesystem/Filesystem.php(62): stream_copy_to_stream(Resource id #643, Resource id #645)

### Expected Behavior

no error

### Current Behavior

error

### Reproduction Steps

copy file to s3

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### SDK version used

3.293.10

### Environment details (Version of PHP (`php -v`)? OS name and version, etc.)

PHP 8.2.13 (cli) (built: Nov 24 2023 13:15:01) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.13, Copyright (c) Zend Technologies with Zend OPcache v8.2.13, Copyright (c), by Zend Technologies

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.