|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-08 14:38 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 01:00:01 2025 UTC |
Description: ------------ The extract() method of the RarEntry class does not to accept the password (3rd) argument, though the method seems to have it whenever I reflect the class. I do know I can also provide the password using the RarArchive::open() method, but that is not relevant to this bug imho. Take note: the protected test archive just contains a file 'txt.txt' having random textual content Reproduce code: --------------- $rc = new ReflectionClass('RarEntry'); $i=0; foreach ($rc->getMethod('extract')->getParameters() as $p) echo "prm#".($i++)." {$p->name}\n"; $arc = RarArchive::open('protarch.rar'); $ok=$arc->getEntry('txt.txt')->extract(false,'C:\\tmp\\pwd_txt.txt', 'pass'); if ($ok) echo 'EXTRACTED'; Expected result: ---------------- prm#0 path prm#1 filename prm#2 password EXTRACTED Actual result: -------------- prm#0 path prm#1 filename prm#2 password PHP Warning: RarEntry::extract() expects at most 2 parameters, 3 given in xxxx.php on line xxxx Warning: RarEntry::extract() expects at most 2 parameters, 3 given in in xxxx.php on line xxxx