Skip to content

Commit

Permalink
Bug #19964 - only call legacy constructor on PHP 4, allows gc cleanup…
Browse files Browse the repository at this point in the history
… on PHP 5
  • Loading branch information
mrook committed Jul 7, 2014
1 parent 7a6f127 commit cffe482
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Archive/Tar.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ class Archive_Tar extends PEAR
*/
function Archive_Tar($p_tarname, $p_compress = null)
{
$this->PEAR();
if (version_compare(PHP_VERSION, '5.0.0', '<')) {
$this->PEAR();
}
$this->_compress = false;
$this->_compress_type = 'none';
if (($p_compress === null) || ($p_compress == '')) {
Expand Down Expand Up @@ -216,6 +218,14 @@ function _Archive_Tar()

// }}}

// {{{ PHP5-compatible destructor
function __destruct()
{
$this->_Archive_Tar();
}

// }}}

// {{{ create()
/**
* This method creates the archive file and add the files / directories
Expand Down

0 comments on commit cffe482

Please sign in to comment.