summaryrefslogtreecommitdiff
path: root/ext/phar/tests/tar/files/tarmaker.php.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar/tests/tar/files/tarmaker.php.inc')
-rw-r--r--ext/phar/tests/tar/files/tarmaker.php.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/phar/tests/tar/files/tarmaker.php.inc b/ext/phar/tests/tar/files/tarmaker.php.inc
index 902507881a..9b8d348fbb 100644
--- a/ext/phar/tests/tar/files/tarmaker.php.inc
+++ b/ext/phar/tests/tar/files/tarmaker.php.inc
@@ -107,16 +107,16 @@ class tarmaker
$checksum = pack('a8', sprintf('%6s ', decoct($checksum)));
- fwrite($this->tmp, $block . $checksum . $blockend, 512);
+ fwrite($this->tmp, (binary)$block . $checksum . $blockend, 512);
if (is_resource($fileOrStream)) {
stream_copy_to_stream($fileOrStream, $this->tmp);
if ($stat['size'] % 512) {
- fwrite($this->tmp, str_repeat("\0", 512 - $stat['size'] % 512));
+ fwrite($this->tmp, (binary)str_repeat("\0", 512 - $stat['size'] % 512));
}
} else {
- fwrite($this->tmp, $fileOrStream);
+ fwrite($this->tmp, (binary)$fileOrStream);
if (strlen($fileOrStream) % 512) {
- fwrite($this->tmp, str_repeat("\0", 512 - strlen($fileOrStream) % 512));
+ fwrite($this->tmp, (binary)str_repeat("\0", 512 - strlen($fileOrStream) % 512));
}
}
}