Skip to content

Commit 3712d24

Browse files
committed
url_stat can't be called on an Cinitialized stream wrapper
1 parent d10be38 commit 3712d24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/GridFS/StreamWrapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ public function stream_write(string $data): int
300300
/** @return false|array */
301301
public function url_stat(string $path, int $flags)
302302
{
303+
assert($this->stream === null);
304+
303305
try {
304306
$this->stream_open($path, 'r', 0, $openedPath);
305307
} catch (FileNotFoundException $e) {

0 commit comments

Comments
 (0)