Skip to content

Commit

Permalink
source code copied from azure-storage-php for v1.5.4-blob release
Browse files Browse the repository at this point in the history
  • Loading branch information
vinjiang committed Sep 2, 2022
1 parent 9aec3e1 commit 1023ce1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2022.08 - version 1.5.4
* Check `$copyProgress` is not null before using it in `strpos`.

2021.09 - version 1.5.3
* Upgraded dependency for `azure-storage-common` to version 1.5.2.
* Resolved some interface inconsistency between `IBlob`/`BlobRestProxy`.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ cURL can't verify the validity of Microsoft certificate when trying to issue a r

## Code samples

You can find samples in the [sample folder](samples)
You can find samples in the [samples folder](https://github.com/Azure/azure-storage-php/tree/master/samples)


# Migrate from [Azure SDK for PHP](https://github.com/Azure/azure-sdk-for-php/)
Expand All @@ -168,7 +168,7 @@ Be sure to check out the Microsoft Azure [Developer Forums on Stack Overflow](ht

# Contribute Code or Provide Feedback

If you would like to become an active contributor to this project please follow the instructions provided in [Azure Projects Contribution Guidelines](https://azure.github.io/guidelines/).
If you would like to become an active contributor to this project please follow the instructions provided in [Azure Projects Contribution Guidelines](https://opensource.microsoft.com/program/#program-contributing).
You can find more details for contributing in the [CONTRIBUTING.md](CONTRIBUTING.md).

If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-storage-php/issues) section of the project.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "microsoft/azure-storage-blob",
"version": "1.5.3",
"version": "1.5.4",
"description": "This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage Blob APIs.",
"keywords": [ "php", "azure", "storage", "sdk", "blob" ],
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/Blob/Internal/BlobResources.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class BlobResources extends Resources
{
// @codingStandardsIgnoreStart

const BLOB_SDK_VERSION = '1.5.3';
const BLOB_SDK_VERSION = '1.5.4';
const STORAGE_API_LATEST_VERSION = '2017-11-09';

// Error messages
Expand Down
4 changes: 2 additions & 2 deletions src/Blob/Models/CopyState.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static function createFromXml(array $parsed)

$copyProgress = Utilities::tryGetValue($clean, 'copyprogress');

if (strpos($copyProgress, '/') !== false) {
if (!is_null($copyProgress) && strpos($copyProgress, '/') !== false) {
$parts = explode('/', $copyProgress);
$bytesCopied = intval($parts[0]);
$totalBytes = intval($parts[1]);
Expand Down Expand Up @@ -112,7 +112,7 @@ public static function createFromHttpHeaders(array $parsed)
$result->setSource(Utilities::tryGetValue($clean, Resources::X_MS_COPY_SOURCE));

$copyProgress = Utilities::tryGetValue($clean, Resources::X_MS_COPY_PROGRESS);
if (strpos($copyProgress, '/') !== false) {
if (!is_null($copyProgress) && strpos($copyProgress, '/') !== false) {
$parts = explode('/', $copyProgress);
$bytesCopied = intval($parts[0]);
$totalBytes = intval($parts[1]);
Expand Down

0 comments on commit 1023ce1

Please sign in to comment.