File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,12 @@ public function createStream($body = null)
24
24
} else {
25
25
$ stream = new Stream ('php://memory ' , 'rw ' );
26
26
27
- if (null !== $ body || '' ! == $ body ) {
28
- $ stream -> write (( string ) $ body ) ;
27
+ if (null === $ body || '' = == $ body ) {
28
+ return $ stream ;
29
29
}
30
30
31
+ $ stream ->write ((string ) $ body );
32
+
31
33
$ body = $ stream ;
32
34
}
33
35
}
Original file line number Diff line number Diff line change @@ -28,9 +28,11 @@ public function createStream($body = null)
28
28
$ resource = fopen ('php://memory ' , 'r+ ' );
29
29
$ stream = new Stream ($ resource );
30
30
31
- if (null !== $ body || '' ! == $ body ) {
32
- $ stream -> write (( string ) $ body ) ;
31
+ if (null === $ body || '' = == $ body ) {
32
+ return $ stream ;
33
33
}
34
+
35
+ $ stream ->write ((string ) $ body );
34
36
}
35
37
36
38
$ stream ->rewind ();
You can’t perform that action at this time.
0 commit comments