diff --git a/PHPCI/Controller/WebhookController.php b/PHPCI/Controller/WebhookController.php index 4b444d03..314a0d8d 100644 --- a/PHPCI/Controller/WebhookController.php +++ b/PHPCI/Controller/WebhookController.php @@ -116,8 +116,11 @@ class WebhookController extends \b8\Controller foreach ($payload['push']['changes'] as $commit) { try { $email = $commit['new']['target']['author']['raw']; - $email = substr($email, 0, strpos($email, '>')); - $email = substr($email, strpos($email, '<') + 1); + if (strpos($email, '>') !== false) { + // In order not to loose email if it is RAW, w/o "<>" symbols + $email = substr($email, 0, strpos($email, '>')); + $email = substr($email, strpos($email, '<') + 1); + } $results[$commit['new']['target']['hash']] = $this->createBuild( $project,