|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59939 Streaming empty file from archive issues a warning
Submitted: 2011-09-07 06:11 UTC Modified: 2013-02-18 00:35 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: kkroflin at gmail dot com Assigned: cataphract (profile)
Status: No Feedback Package: rar (PECL)
PHP Version: 5.3.5 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-09-07 06:11 UTC] kkroflin at gmail dot com
Streaming empty file from archive issues a warning.

Reproduce code:
$rar = RarArchive::open($file);
if($rar === false) die();

$rar_file = @$rar->getEntry($file_path);
if($rar_file === false) die();

$stream = @$rar_file->getStream();
if($stream === false) die();

while(!feof($stream)) {
    fread($stream, 1024*1024);

Expected result:
fread() should't issue a warning.

Actual result:
fread() issues a warning.

Warning: fread(): Extraction reported as unfinished but no data read. Please report this, as this is a bug.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-02 16:58 UTC]
-Assigned To: +Assigned To: cataphract
 [2012-07-29 00:45 UTC]
-Status: Assigned +Status: Feedback
 [2012-07-29 00:45 UTC]
I can't reproduce this. Do you still have the file that caused this?

 [2012-07-31 16:59 UTC] kkroflin at gmail dot com

$file = 'empty.rar';
$file_path = 'empty';
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 21:01:28 2024 UTC