1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-07-29 11:40:10 +02:00

Fixed the call array_fill() with the number of elements 0 for PHP 5.5

This commit is contained in:
Ne-Lexa
2017-11-17 11:08:20 +03:00
parent a3083b821c
commit 4979829fad

View File

@@ -48,12 +48,15 @@ class ApkAlignmentExtraField implements ExtraField
*/ */
public function serialize() public function serialize()
{ {
if ($this->padding > 0) {
$args = array_merge( $args = array_merge(
['vc*', $this->multiple], ['vc*', $this->multiple],
array_fill(2, $this->padding, 0) array_fill(2, $this->padding, 0)
); );
return call_user_func_array('pack', $args); return call_user_func_array('pack', $args);
} }
return pack('v', $this->multiple);
}
/** /**
* Initializes this Extra Field by deserializing a Data Block. * Initializes this Extra Field by deserializing a Data Block.