php.net |  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
Votes:1
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
41 + 46 = ?
Subscribe to this entry?

 
 [2011-09-07 06:11 UTC] kkroflin at gmail dot com
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Thanks.
 [2012-07-31 16:59 UTC] kkroflin at gmail dot com
https://www.dropbox.com/s/9g4l6cn70pgcqoe/empty.rar

$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: Sat Jul 27 04:01:30 2024 UTC