You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
RuntimeException thrown by Psr17Factory::createServerRequestFromGlobals() if uploaded file was already processed by move_uploaded_file() - thus no longer exists at the tmp_name location.
RuntimeException: Unable to open "/tmp/phpPHolDZ" using mode "r": fopen(/tmp/phpPHolDZ): Failed to open stream: No such file or directory in GuzzleHttp\Psr7\Utils::GuzzleHttp\Psr7\{closure}() (line 357 of /vendor/guzzlehttp/psr7/src/Utils.php)
#0 [internal function]: GuzzleHttp\Psr7\Utils::GuzzleHttp\Psr7\{closure}(2, '...', '...', 369)
#1 /vendor/guzzlehttp/psr7/src/Utils.php(369): fopen('...', '...')
#2 /vendor/guzzlehttp/psr7/src/HttpFactory.php(56): GuzzleHttp\Psr7\Utils::tryFopen('...', '...')
#3 /vendor/php-http/discovery/src/Psr17Factory.php(124): GuzzleHttp\Psr7\HttpFactory->createStreamFromFile('...', '...')
#4 /vendor/php-http/discovery/src/Psr17Factory.php(286): Http\Discovery\Psr17Factory->createStreamFromFile('...', '...')
#5 /vendor/php-http/discovery/src/Psr17Factory.php(292): Http\Discovery\Psr17Factory->createUploadedFileFromSpec(Array)
#6 /vendor/php-http/discovery/src/Psr17Factory.php(292): Http\Discovery\Psr17Factory->createUploadedFileFromSpec(Array)
#7 /vendor/php-http/discovery/src/Psr17Factory.php(269): Http\Discovery\Psr17Factory->createUploadedFileFromSpec(Array)
#8 /vendor/php-http/discovery/src/Psr17Factory.php(184): Http\Discovery\Psr17Factory->normalizeFiles(Array)
#9 /vendor/php-http/discovery/src/Psr17Factory.php(106): Http\Discovery\Psr17Factory->buildServerRequestFromGlobals(Object(GuzzleHttp\Psr7\ServerRequest), Array, Array)
How to reproduce
Call Psr17Factory::createServerRequestFromGlobals() during a request with a file upload that was already processed by move_uploaded_file()
Possible Solution
Is it necessary to try to open uploaded files? If so can the RuntimeException be caught?
PHP version: 8.2.5
Description
RuntimeException thrown by Psr17Factory::createServerRequestFromGlobals() if uploaded file was already processed by move_uploaded_file() - thus no longer exists at the tmp_name location.
How to reproduce
Call Psr17Factory::createServerRequestFromGlobals() during a request with a file upload that was already processed by move_uploaded_file()
Possible Solution
Is it necessary to try to open uploaded files? If so can the RuntimeException be caught?
Additional context
Discovered at getsentry/sentry-php#1520
The text was updated successfully, but these errors were encountered: