Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 877cae1

Browse files
author
Unknown
committed
Merge remote-tracking branch 'Lyquix/master'
2 parents 90ac08a + 484bc2e commit 877cae1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,6 @@ You must keep in mind that this script can be dangerous if misused or abused. We
205205

206206
* [SagePtr](https://github.com/SagePtr)
207207
* [Advanced deployment options](https://github.com/Lyquix/php-git-deploy/pull/4)
208+
* [7twin](https://github.com/7twin)
209+
* [Workaround for getallheaders() not available in PHP-FPM](https://github.com/Lyquix/php-git-deploy/pull/5)
208210

‎deploy.php‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,18 @@ function endScript() {
164164
// The branch
165165
$branch = '';
166166

167+
if (!function_exists('getallheaders')) {
168+
function getallheaders() {
169+
$headers = [];
170+
foreach ($_SERVER as $name => $value) {
171+
if (substr($name, 0, 5) == 'HTTP_') {
172+
$headers[str_replace('', '-', ucwords(strtolower(str_replace('_', '', substr($name, 5)))))] = $value;
173+
}
174+
}
175+
return $headers;
176+
}
177+
}
178+
167179
// Process request headers
168180
$headers = getallheaders();
169181
if(isset($headers['X-Event-Key'])) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /