Skip to content

fix using count to get string length & header setter #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

lihsai0
Copy link
Collaborator

@lihsai0 lihsai0 commented Mar 2, 2022

  • Warning: count(): Parameter must be an array or an object that implements Countable

    fix warning under php 7.4

  • fix header setter

内部工单 KODO-14447

@codecov
Copy link

codecov bot commented Mar 2, 2022

Codecov Report

Merging #378 (5b1bf18) into master (8414ee6) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #378   +/-   ##
=======================================
  Coverage   89.13%   89.13%           
=======================================
  Files          22       22           
  Lines        1583     1583           
=======================================
  Hits         1411     1411           
  Misses        172      172           
Impacted Files Coverage Δ
src/Qiniu/Auth.php 95.28% <100.00%> (ø)
src/Qiniu/Http/Header.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8414ee6...5b1bf18. Read the comment docs.

@@ -114,7 +114,7 @@ public function signQiniuAuthorization($urlString, $method = "GET", $body = "",

// append body
$data .= "\n\n";
if (count($body) > 0
if (strlen($body) > 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没必要判断$body是否为空,直接去掉strlen()>0就可以啊

- fix using count to get string length
- fix count(xxx > 1)
@lihsai0 lihsai0 changed the title fix using count to get string length fix using count to get string length & header setter Mar 28, 2022
@xwen-winnie xwen-winnie merged commit 13c677e into master Mar 31, 2022
@lihsai0
Copy link
Collaborator Author

lihsai0 commented Apr 1, 2022

close #379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants