Skip to content
This repository was archived by the owner on May 8, 2024. It is now read-only.

Commit eadb037

Browse files
committed
Merge pull request #12 from nowenL/release
Release for v0.10.1
2 parents 7afb71c + ce2806a commit eadb037

277 files changed

Lines changed: 293 additions & 282 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ChangeLog.md

Lines changed: 5 additions & 0 deletions

README.md

Lines changed: 1 addition & 1 deletion

src/Blob/BlobRestProxy.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
* @author Azure Storage PHP SDK <dmsh@microsoft.com>
8686
* @copyright 2016 Microsoft Corporation
8787
* @license https://github.com/azure/azure-storage-php/LICENSE
88-
* @version Release: 0.10.0
88+
* @version Release: 0.10.1
8989
* @link https://github.com/azure/azure-storage-php
9090
*/
9191
class BlobRestProxy extends ServiceRestProxy implements IBlob
@@ -195,6 +195,10 @@ private function _getBlobUrl($container, $blob)
195195
$encodedBlob = $container . '/' . $encodedBlob;
196196
}
197197

198+
if (substr($encodedBlob, 0, 1) != '/' && substr($this->getUri(), -1, 1) != '/')
199+
{
200+
$encodedBlob = '/' . $encodedBlob;
201+
}
198202
return $this->getUri() . $encodedBlob;
199203
}
200204

@@ -1352,11 +1356,13 @@ public function createBlockBlob($container, $blob, $content, $options = null)
13521356
$content = substr_replace($content, '', 0, $blockSize);
13531357
}
13541358
}
1355-
$block = new Block();
1356-
$block->setBlockId(base64_encode(str_pad($counter++, 6, '0', STR_PAD_LEFT)));
1357-
$block->setType('Uncommitted');
1358-
array_push($blockIds, $block);
1359-
$this->createBlobBlock($container, $blob, $block->getBlockId(), $body);
1359+
if (!empty($body)) {
1360+
$block = new Block();
1361+
$block->setBlockId(base64_encode(str_pad($counter++, 6, '0', STR_PAD_LEFT)));
1362+
$block->setType('Uncommitted');
1363+
array_push($blockIds, $block);
1364+
$this->createBlobBlock($container, $blob, $block->getBlockId(), $body);
1365+
}
13601366
}
13611367
$response = $this->commitBlobBlocks($container, $blob, $blockIds, $options);
13621368
}

src/Blob/Internal/IBlob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @author Azure Storage PHP SDK <dmsh@microsoft.com>
3434
* @copyright 2016 Microsoft Corporation
3535
* @license https://github.com/azure/azure-storage-php/LICENSE
36-
* @version Release: 0.10.0
36+
* @version Release: 0.10.1
3737
* @link https://github.com/azure/azure-storage-php
3838
* @see http://msdn.microsoft.com/en-us/library/windowsazure/dd135733.aspx
3939
*/

src/Blob/Models/AccessCondition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @author Azure Storage PHP SDK <dmsh@microsoft.com>
3737
* @copyright 2016 Microsoft Corporation
3838
* @license https://github.com/azure/azure-storage-php/LICENSE
39-
* @version Release: 0.10.0
39+
* @version Release: 0.10.1
4040
* @link https://github.com/azure/azure-storage-php
4141
*/
4242
class AccessCondition

src/Blob/Models/AccessPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @author Azure Storage PHP SDK <dmsh@microsoft.com>
3636
* @copyright 2016 Microsoft Corporation
3737
* @license https://github.com/azure/azure-storage-php/LICENSE
38-
* @version Release: 0.10.0
38+
* @version Release: 0.10.1
3939
* @link https://github.com/azure/azure-storage-php
4040
*/
4141
class AccessPolicy

src/Blob/Models/AcquireLeaseOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @author Azure Storage PHP SDK <dmsh@microsoft.com>
3333
* @copyright 2016 Microsoft Corporation
3434
* @license https://github.com/azure/azure-storage-php/LICENSE
35-
* @version Release: 0.10.0
35+
* @version Release: 0.10.1
3636
* @link https://github.com/azure/azure-storage-php
3737
*/
3838
class AcquireLeaseOptions extends BlobServiceOptions

src/Blob/Models/AcquireLeaseResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @author Azure Storage PHP SDK <dmsh@microsoft.com>
3535
* @copyright 2016 Microsoft Corporation
3636
* @license https://github.com/azure/azure-storage-php/LICENSE
37-
* @version Release: 0.10.0
37+
* @version Release: 0.10.1
3838
* @link https://github.com/azure/azure-storage-php
3939
*/
4040
class AcquireLeaseResult

src/Blob/Models/Blob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @author Azure Storage PHP SDK <dmsh@microsoft.com>
3333
* @copyright 2016 Microsoft Corporation
3434
* @license https://github.com/azure/azure-storage-php/LICENSE
35-
* @version Release: 0.10.0
35+
* @version Release: 0.10.1
3636
* @link https://github.com/azure/azure-storage-php
3737
*/
3838
class Blob

src/Blob/Models/BlobBlockType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @author Azure Storage PHP SDK <dmsh@microsoft.com>
3333
* @copyright 2016 Microsoft Corporation
3434
* @license https://github.com/azure/azure-storage-php/LICENSE
35-
* @version Release: 0.10.0
35+
* @version Release: 0.10.1
3636
* @link https://github.com/azure/azure-storage-php
3737
*/
3838
class BlobBlockType

0 commit comments

Comments
 (0)