Skip to content

Commit

Permalink
Make this work with PHP < 5.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Apr 26, 2017
1 parent e0e7caa commit 076b00c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion framework/Compress/lib/Horde/Compress/Base.php
Expand Up @@ -104,9 +104,13 @@ public function compressDirectory($directory, array $params = array())
$regexp = '/^' . preg_quote($directory . '/', '/') . '/';
$data = array();
foreach ($iterator as $file) {
$content = '';
foreach ($file->openFile() as $line) {
$content .= $line;
}
$data[] = array(
'name' => preg_replace($regexp, '', $file->getPathName()),
'data' => $file->openFile()->fread($file->getSize()),
'data' => $content,
'time' => $file->getMTime(),
'spl' => $file,
);
Expand Down

0 comments on commit 076b00c

Please sign in to comment.