1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-01-17 20:58:22 +01: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,11 +48,14 @@ class ApkAlignmentExtraField implements ExtraField
*/
public function serialize()
{
$args = array_merge(
['vc*', $this->multiple],
array_fill(2, $this->padding, 0)
);
return call_user_func_array('pack', $args);
if ($this->padding > 0) {
$args = array_merge(
['vc*', $this->multiple],
array_fill(2, $this->padding, 0)
);
return call_user_func_array('pack', $args);
}
return pack('v', $this->multiple);
}
/**