Skip to content

Commit 5555799

Browse files
committed
Fix str_pad direction
Without this fix, The 1, 10 and 100 blocks have the same identifier. The upload complete but the destination file is corrupted
1 parent 84bac84 commit 5555799

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WindowsAzure/Blob/BlobRestProxy.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ public function createBlockBlob($container, $blob, $content, $options = null)
13481348
}
13491349
}
13501350
$block = new Block();
1351-
$block->setBlockId(base64_encode(str_pad($counter++, '0', 6)));
1351+
$block->setBlockId(base64_encode(str_pad($counter++, '0', 6, STR_PAD_LEFT)));
13521352
$block->setType('Uncommitted');
13531353
array_push($blockIds, $block);
13541354
$this->createBlobBlock($container, $blob, $block->getBlockId(), $body);

0 commit comments

Comments
 (0)