X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Farchive.inc;h=1b9e11efe4735753b7c1d8979e77a4b446f921ae;hb=a3a7b7f04ec0c7c6bec675533e34a5a52d9ece7a;hp=b99b15dbca51e295c5250b1e8dd8c5d229061727;hpb=ad368eab7bb7042070c9d5222c631d7aa299f43b;p=fa-stable.git 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 (