Skip to content

Commit 6aacc83

Browse files
Fixes
1 parent e0e86ee commit 6aacc83

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Utils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ public static function tryFopen(string $filename, string $mode)
397397
restore_error_handler();
398398

399399
if ($ex) {
400-
/** @var $ex \RuntimeException */
400+
/** @var \RuntimeException $ex */
401401
throw $ex;
402402
}
403403

@@ -444,7 +444,7 @@ public static function tryGetContents($stream): string
444444
restore_error_handler();
445445

446446
if ($ex) {
447-
/** @var $ex \RuntimeException */
447+
/** @var \RuntimeException $ex */
448448
throw $ex;
449449
}
450450

tests/UploadedFileTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ public function testGetStreamReturnsStreamForFile(): void
7676
$upload = new UploadedFile($stream, 0, UPLOAD_ERR_OK);
7777
$uploadStream = $upload->getStream();
7878
$r = new ReflectionProperty($uploadStream, 'filename');
79-
$r->setAccessible(true);
79+
80+
if (PHP_VERSION_ID < 80100) {
81+
$r->setAccessible(true);
82+
}
8083

8184
self::assertSame($stream, $r->getValue($uploadStream));
8285
}

0 commit comments

Comments
 (0)