File tree Expand file tree Collapse file tree 4 files changed +17
-1
lines changed
Expand file tree Collapse file tree 4 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 11# HTTP Message Change Log
22
3+ ## 1.1.1 - Under development
4+
5+ ### Fixed
6+
7+ - [ #27 ] ( https://github.com/httpsoft/http-message/pull/27 ) Fix error handling on stream reading
8+
39## 1.1.1 - 2023.05.06
410
511### Fixed
Original file line number Diff line number Diff line change 22<psalm
33 errorLevel =" 1"
44 findUnusedPsalmSuppress =" true"
5+ findUnusedBaselineEntry =" true"
6+ findUnusedCode =" false"
57 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
68 xmlns =" https://getpsalm.org/schema/config"
79 xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Original file line number Diff line number Diff line change 66
77use InvalidArgumentException ;
88use RuntimeException ;
9+ use Throwable ;
910
1011use function array_key_exists ;
1112use function fclose ;
@@ -354,7 +355,12 @@ public function getMetadata($key = null)
354355 return $ key ? null : [];
355356 }
356357
357- $ metadata = stream_get_meta_data ($ this ->resource );
358+ try {
359+ $ metadata = stream_get_meta_data ($ this ->resource );
360+ } catch (Throwable $ e ) {
361+ $ this ->detach ();
362+ throw new RuntimeException ('Unable to read stream contents: ' . $ e ->getMessage ());
363+ }
358364
359365 if ($ key === null ) {
360366 return $ metadata ;
Original file line number Diff line number Diff line change @@ -506,6 +506,8 @@ private function normalizeFragment(string $fragment): string
506506 * @param string $string
507507 * @param string $pattern
508508 * @return string
509+ *
510+ * @psalm-param non-empty-string $pattern
509511 */
510512 private function encode (string $ string , string $ pattern ): string
511513 {
You can’t perform that action at this time.
0 commit comments