Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Zend\Filter\Compress\Tar::setMode() would not work #6102

Closed
sasezaki opened this Issue Apr 8, 2014 · 0 comments

Comments

Projects
None yet
2 participants
Contributor

sasezaki commented Apr 8, 2014

<?php
$tar = new Zend\Filter\Compress\Tar;
$tar->setTarget(__DIR__.'/data.txt');
$tar->setArchive(__DIR__.'/data.tar.gz');
$tar->setMode('gz');
$tar->compress('compress me');

will raise error

PHP Fatal error:  Uncaught exception 'Zend\Filter\Exception\RuntimeException' with message 'Error creating the Tar archive' in /home/sasezaki/dev/zendframework_zf2/library/Zend/Filter/Compress/Tar.php:188

Because setMode() keeps mode as ucfirst(strtolower($mode)).
and Archive_Tar accepts only strtolowers.

This issue will be raise zf1, too.

@Ocramius Ocramius self-assigned this Apr 9, 2014

@Ocramius Ocramius added this to the 2.3.1 milestone Apr 9, 2014

Ocramius added a commit that referenced this issue Apr 9, 2014

@Ocramius Ocramius closed this in 5191974 Apr 9, 2014

gianarb pushed a commit to zendframework/zend-filter that referenced this issue May 15, 2015

gianarb pushed a commit to zendframework/zend-filter that referenced this issue May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment