Skip to content

Commit a4ca1ba

Browse files
ZRZ2233zhurenzhu.zrz
andauthored
if cpus not exist return default value (#52)
* add default num if cpu key not exist * update version --------- Co-authored-by: zhurenzhu.zrz <zhurenzhu.zrz@alibaba-inc.com>
1 parent 2962041 commit a4ca1ba

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Aliyun/Log/Models/Response/LogStoreSqlResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public function __construct($resp, $header) {
6464
$this->progress = $header ['x-log-progress'];
6565
$this->processedRows = $header['x-log-processed-rows'];
6666
$this->elapsedMilli = $header['x-log-elapsed-millisecond'];
67-
$this->cpuSec = $header['x-log-cpu-sec'];
68-
$this->cpuCores = $header['x-log-cpu-cores'];
67+
$this->cpuSec = $header['x-log-cpu-sec']??0;
68+
$this->cpuCores = $header['x-log-cpu-cores']??0;
6969
$this->logs = array ();
7070
foreach ( $resp as $data ) {
7171
$contents = $data;

Aliyun/Log/Models/Response/ProjectSqlResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public function __construct($resp, $header) {
6464
$this->progress = $header ['x-log-progress'];
6565
$this->processedRows = $header['x-log-processed-rows'];
6666
$this->elapsedMilli = $header['x-log-elapsed-millisecond'];
67-
$this->cpuSec = $header['x-log-cpu-sec'];
68-
$this->cpuCores = $header['x-log-cpu-cores'];
67+
$this->cpuSec = $header['x-log-cpu-sec']??0;
68+
$this->cpuCores = $header['x-log-cpu-cores']??0;
6969
$this->logs = array ();
7070
foreach ( $resp as $data ) {
7171
$contents = $data;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
},
3535
"name": "alibabacloud/aliyun-log-php-sdk",
3636
"license": "MIT",
37-
"version": "0.6.7"
37+
"version": "0.6.8"
3838
}

0 commit comments

Comments
 (0)