Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-425

GridFS methods should throw if stream_copy_to_stream() fails

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.0-rc1, 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • None

      The following GridFS methods use stream_copy_to_stream():

      • downloadToStream
      • downloadToStreamByName
      • uploadFromStream

      These methods currently throw exceptions if the file cannot be opened or a driver exception is encountered, but they do not check that stream_copy_to_stream() succeeds.

      Users may already be aware of stream IO errors since our StreamWrapper may emit an E_USER_WARNING with an internal exception message, but we would do well to throw an exception if stream_copy_to_stream() returns boolean false.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: