Skip to content
Snippets Groups Projects
  • Vincent Petry's avatar
    d6ce45fe
    Correctly read the full stream in file_get_contents · d6ce45fe
    Vincent Petry authored
    When using user-defined stream wrappers, PHP will
    return a maximum of 8192 bytes even if more was
    requested.
    
    This fix uses stream_get_contents to make sure the full stream is read
    and not only the first 8 KB.
    
    Added unit test with a bigger test file to cover this case.
    d6ce45fe
    History
    Correctly read the full stream in file_get_contents
    Vincent Petry authored
    When using user-defined stream wrappers, PHP will
    return a maximum of 8192 bytes even if more was
    requested.
    
    This fix uses stream_get_contents to make sure the full stream is read
    and not only the first 8 KB.
    
    Added unit test with a bigger test file to cover this case.