Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

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

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

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

sasezaki opened this issue Apr 8, 2014 · 0 comments
Assignees
Milestone

Comments

@sasezaki
Copy link
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
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants