projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9174e48
)
Fixed compatibility w/ ancient PHP versions
author
Alexander Ebert
<ebert@woltlab.com>
Mon, 3 Jul 2017 14:57:48 +0000
(16:57 +0200)
committer
Alexander Ebert
<ebert@woltlab.com>
Mon, 3 Jul 2017 14:57:48 +0000
(16:57 +0200)
wcfsetup/install.php
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install.php
b/wcfsetup/install.php
index 827262db6d363e6034c225dd96e6692c1fd26c5e..fe52785f7fa9cac7bfadc98414f0d8446751928f 100644
(file)
--- a/
wcfsetup/install.php
+++ b/
wcfsetup/install.php
@@
-599,7
+599,12
@@
class Tar {
$longFilename = null;
}
if ($header['typeflag'] == 'L') {
- $format = 'Z' . $header['size'] . 'filename';
+ if (version_compare(PHP_VERSION, '5.5.0-dev', '>=')) {
+ $format = 'Z' . $header['size'] . 'filename';
+ }
+ else {
+ $format = 'a' . $header['size'] . 'filename';
+ }
$fileData = unpack($format, $this->file->read(512));
$longFilename = $fileData['filename'];