Fixed Notice error. Issue #185.

This commit is contained in:
Dmitry Khomutov 2018-06-04 20:54:33 +07:00
commit 11ef5ef302
No known key found for this signature in database
GPG key ID: EC19426474B37AAC

View file

@ -605,7 +605,11 @@ class WebhookController extends Controller
Project::TYPE_GIT,
]);
switch ($_SERVER['CONTENT_TYPE']) {
$contentType = !empty($_SERVER['CONTENT_TYPE'])
? $_SERVER['CONTENT_TYPE']
: null;
switch ($contentType) {
case 'application/x-www-form-urlencoded':
$payload = json_decode($this->getParam('payload'), true);
break;