From: Joe Hunt Date: Sun, 31 Jan 2021 15:11:10 +0000 (+0100) Subject: Bug 5326 needs reversion for PHP < 5.5. Fixed. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=a3a7b7f04ec0c7c6bec675533e34a5a52d9ece7a Bug 5326 needs reversion for PHP < 5.5. Fixed. --- diff --git a/includes/archive.inc b/includes/archive.inc index b99b15db..1b9e11ef 100644 --- a/includes/archive.inc +++ b/includes/archive.inc @@ -322,8 +322,10 @@ class tar_file extends archive while ($block = fread($fp, 512)) { - $temp = unpack("Z100name/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Z1type/Z100symlink/Z6magic/Z2temp/Z32temp/Z32temp/Z8temp/Z8temp/Z155prefix/Z12temp", $block); - + if (version_compare(PHP_VERSION, '5.5.0') >= 0) + $temp = unpack("Z100name/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/Z8checksum/Z1type/Z100symlink/Z6magic/Z2temp/Z32temp/Z32temp/Z8temp/Z8temp/Z155prefix/Z12temp", $block); + else + $temp = unpack("a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100symlink/a6magic/a2temp/a32temp/a32temp/a8temp/a8temp/a155prefix/a12temp", $block); $file = array ( 'name' => rtrim($temp['prefix']) . rtrim($temp['name']), 'stat' => array (