Skip to content

Fix HTTP request corruption by the user agent #32

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
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/php/libsdk/SDK/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public static function guessCurrentBranchName() : ?string
}

/* Try to figure out the branch. The worky scenarios are
- CWD is in php-src
- CWD is in php-src
- phpize is on the path
FIXME for the dev package, there should be a php-config utility
*/
Expand Down Expand Up @@ -256,7 +256,7 @@ public static function guessCurrentBranchName() : ?string
$cmd = "\"$git\" branch";

$ret = trim(shell_exec($cmd));
if (preg_match_all(",\*\s+master,", $ret) > 0) {
if (preg_match_all(",\*\s+master,", $ret) > 0) {
$branch = "master";
}
}
Expand All @@ -271,7 +271,7 @@ public static function getCurrentBranchName() : string
$branch = self::guessCurrentBranchName();
self::setCurrentBranchName($branch);
}

return self::$currentBranchName;
}/*}}}*/

Expand Down Expand Up @@ -336,7 +336,7 @@ public static function getCurrentBranchData() : array
throw new Exception("Failed to find config with arch '" . self::getCurrentArchName() . "'");
}

return $ret;
return $ret;
}/*}}}*/

public static function getSdkNugetFeedUrl() : string
Expand Down Expand Up @@ -368,7 +368,7 @@ public static function getSdkVersion() : string
throw new Exception("Couldn't find the SDK version file.");
}

return file_get_contents($path);
return trim(file_get_contents($path));
}/*}}}*/

public static function getDepsLocalPath() : ?string
Expand All @@ -391,7 +391,7 @@ public static function getDepsLocalPath() : ?string
self::setDepsLocalPath($tmp);
}
}

if (NULL == self::$depsLocalPath) {
$tmp = realpath("../deps");
if (is_dir($tmp)) {
Expand Down