diff --git a/PHPCI/Controller/WebhookController.php b/PHPCI/Controller/WebhookController.php index 550036b1..c424fd24 100644 --- a/PHPCI/Controller/WebhookController.php +++ b/PHPCI/Controller/WebhookController.php @@ -175,7 +175,8 @@ class WebhookController extends \PHPCI\Controller */ public function gitlab($project) { - $payload = json_decode($this->getParam('payload'), true); + $payloadString = file_get_contents("php://input"); + $payload = json_decode($payloadString, true); try { diff --git a/PHPCI/Model/Base/ProjectBase.php b/PHPCI/Model/Base/ProjectBase.php index c16d3ee5..0ef016f7 100644 --- a/PHPCI/Model/Base/ProjectBase.php +++ b/PHPCI/Model/Base/ProjectBase.php @@ -221,10 +221,12 @@ class ProjectBase extends Model */ public function getAccessInformation($key = null) { + $data = unserialize($this->data['access_information']); + if (is_null($key)) { - $rtn = $this->data['access_information']; - } else if (isset($this->data['access_information'][$key])) { - $rtn = $this->data['access_information'][$key]; + $rtn = $data; + } else if (isset($data[$key])) { + $rtn = $data[$key]; } else { $rtn = null; }