Reduce potential existence bugs

This commit is contained in:
Dennis Eichhorn 2018-03-30 12:17:55 +02:00
parent de4eb598f1
commit b3007d74c2

View File

@ -1,9 +1,9 @@
<?php <?php
$postBody = $_POST['payload']; $postBody = $_POST['payload'] ?? '';
$payload = json_decode($postBody, true); $payload = json_decode($postBody, true);
if ($payload['repository']['name'] === 'Orange-Management') { if (isset($payload['repository'], $payload['repository']['name']) && $payload['repository']['name'] === 'Orange-Management') {
shell_exec('./buildProject.sh > /dev/null 2>/dev/null &'); shell_exec('./buildProject.sh > /dev/null 2>/dev/null &');
echo 'Installing'; echo 'Installing';