Author | SHA1 | Message | Date |
---|---|---|---|
|
76dad297ff |
Fix encryption feof to not return too early
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. |
9 years ago |
|
d6ce45fe61 |
Correctly read the full stream in file_get_contents
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. |
10 years ago |