Skip to content

Commit

Permalink
Fix use proxy get env
Browse files Browse the repository at this point in the history
  • Loading branch information
xu42 committed Feb 21, 2020
1 parent 26c4879 commit 1c558ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Open/Config/HttpConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class HttpConfig

const FORMAT_USER_AGENT = 'YZY-Open-Client %s-PHP';

const SDK_VERSION = '2.0.19';
const SDK_VERSION = '2.0.20';

const REQUEST_BASE_URL = 'https://open.youzanyun.com';

Expand Down
10 changes: 9 additions & 1 deletion src/Open/Helper/EcommerceHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ private static function isUseProxy()

private static function getEnvValue($key)
{
return getenv($key);
if (empty($key)) {
return null;
}

if (isset($_SERVER[$key])) {
return $_SERVER[$key];
}

return null;
}
}

0 comments on commit 1c558ba

Please sign in to comment.