File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,8 @@ public function getIdFromStream($stream)
183
183
{
184
184
$ metadata = stream_get_meta_data ($ stream );
185
185
186
- if (isset ( $ metadata ['wrapper_data ' ]-> id ) ) {
187
- return $ metadata ['wrapper_data ' ]->id ;
186
+ if ($ metadata ['wrapper_data ' ] instanceof StreamWrapper ) {
187
+ return $ metadata ['wrapper_data ' ]->getId () ;
188
188
}
189
189
190
190
return ;
Original file line number Diff line number Diff line change 12
12
class StreamWrapper
13
13
{
14
14
public $ context ;
15
- public $ id ;
16
15
17
16
private $ collectionsWrapper ;
18
17
private $ gridFSStream ;
18
+ private $ id ;
19
19
private $ mode ;
20
20
21
+ public function getId ()
22
+ {
23
+ return $ this ->id ;
24
+ }
25
+
21
26
public function openReadStream ()
22
27
{
23
28
$ context = stream_context_get_options ($ this ->context );
You can’t perform that action at this time.
0 commit comments