File tree 2 files changed +6
-2
lines changed
src/Media/Process/Adapter
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,9 @@ protected function _process() {
245
245
246
246
$ target = fopen ($ targetTemp , 'r ' );
247
247
$ buffer = fopen ('php://temp ' , 'w+ ' );
248
- stream_copy_to_stream ($ target , $ buffer );
248
+ if (!stream_copy_to_stream ($ target , $ buffer )) {
249
+ throw new Exception ('Failed to copy stream while processing ffmpeg source. ' );
250
+ }
249
251
250
252
fclose ($ target );
251
253
unlink ($ targetTemp );
Original file line number Diff line number Diff line change @@ -122,7 +122,9 @@ public function convert($mimeType) {
122
122
// Workaround for header based formats which require the output stream to be seekable.
123
123
$ target = fopen ($ targetTemp , 'r ' );
124
124
$ buffer = fopen ('php://temp ' , 'w+ ' );
125
- stream_copy_to_stream ($ target , $ buffer );
125
+ if (!stream_copy_to_stream ($ target , $ buffer )) {
126
+ throw new Exception ('Failed to copy stream while processing sox source. ' );
127
+ }
126
128
127
129
fclose ($ target );
128
130
unlink ($ targetTemp );
You can’t perform that action at this time.
0 commit comments