-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
As suggested in mongodb/mongo-php-library#608:
Another change that might fix this, but that might well not be correct: if stream_eof() were to return true after such an error, that might solve the problem. For an exception, I'm not sure what is strictly correct for `eof`, but surely in the case of such an error, the user will never want to read anything else from the stream.
https://www.php.net/manual/en/streamwrapper.stream-eof.php also states that the method:
Should return TRUE if the read/write position is at the end of the stream and if no more data is available to be read, or FALSE otherwise.
Consider having StreamWrapper::stream_eof() return true if some previous operation encountered an exception that would prevent an application from reading the GridFS file. Before implementing this, we'll need to determine how this interacts with forthcoming retryable read behavior (PHPC-1291).
- is related to
-
PHPLIB-592 Allow GridFS StreamWrapper to throw on error instead of emitting a PHP warning
- Closed
- related to
-
PHPLIB-425 GridFS methods should throw if stream_copy_to_stream() fails
- Closed
-
PHPLIB-426 Consider error reporting improvements for GridFS StreamWrapper methods
- Closed
- links to