Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.5

Bug #10247 unnecessary calls to die()
Submitted: 2007-03-02 19:22 UTC
From: mkirk at cs dot umn dot edu Assigned: pfischer
Status: Closed Package: File_Archive (version 1.5.3)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-03-02 19:22 UTC] mkirk at cs dot umn dot edu (Mike)
Description: ------------ It seems reasonable that all calls to die could be replaced with PEAR::raiseError() Specifically, I am handling the case when attempting to extract a gzipped file as a tar-gzip. I encounter the line die('Checksum error on entry '.$this->currentFilename); The script shouldn't just halt, but return a useful error. There are calls to die on line 205 in Archive/Reader/Tar.php and on line 70 in Archive/Reader/Concat.php Test script: --------------- //since uploaded files are given a random name //without a useful extension, we can't extract from //an uploaded archive. $naive_reader = File_Archive::readUploadedFile('submitted_file'); //re-read the file reader with a specified extension $archive = File_Archive::readArchive( $file_extension='tgz' , $naive_reader ); $dir_writer = File_Archive::appender($dir = 'submissions'); $error = File_Archive::extract( $archive , $dir_writer); if( PEAR::isError( $error) ) { echo "there was an error detected, couldnt extract"; } else { echo "archive was extracted"; } Expected result: ---------------- echo either "there was an error detected, couldnt extract" or echo "archive was extracted" Actual result: -------------- this call to die from line 205 in Archive/Reader/Tar.php die('Checksum error on entry '.$this->currentFilename);

Comments

 [2007-05-20 09:49 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-05-20 10:02 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-05-20 18:21 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!