Skip to content
Snippets Groups Projects
  • Vincent Petry's avatar
    76dad297
    Fix encryption feof to not return too early · 76dad297
    Vincent Petry authored
    This is because stream_read will pre-cache the next block which causes
    feof($this->source) to return true prematurely. So we cannot rely on it.
    
    Fixed encryption stream wrapper unit tests to actually simulate 6k/8k
    blocks to make sure we cover the matching logic.
    
    Added two data files with 8192 and 8193 bytes.
    76dad297
    History
    Fix encryption feof to not return too early
    Vincent Petry authored
    This is because stream_read will pre-cache the next block which causes
    feof($this->source) to return true prematurely. So we cannot rely on it.
    
    Fixed encryption stream wrapper unit tests to actually simulate 6k/8k
    blocks to make sure we cover the matching logic.
    
    Added two data files with 8192 and 8193 bytes.