From 8f58902339b429632caeafb409e1cc1a14b15b14 Mon Sep 17 00:00:00 2001 From: Jimmy Cleuren Date: Tue, 19 Nov 2013 22:47:12 +0100 Subject: [PATCH] catch empty commit id from github --- PHPCI/Command/PollCommand.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PHPCI/Command/PollCommand.php b/PHPCI/Command/PollCommand.php index 511bf602..af91acec 100644 --- a/PHPCI/Command/PollCommand.php +++ b/PHPCI/Command/PollCommand.php @@ -58,8 +58,7 @@ class PollCommand extends Command $token = $this->settings['phpci']['github']['token']; - if(!$token) - { + if (!$token) { $this->logger->error("No github token found"); exit(); } @@ -79,8 +78,7 @@ class PollCommand extends Command $this->logger->info("Last commit to github for " . $project->getTitle() . " is " . $last_commit); - if($project->getLastCommit() != $last_commit) - { + if ($project->getLastCommit() != $last_commit && $last_commit != "") { $this->logger->info("Last commit is different from database, adding new build for " . $project->getTitle()); $build = new Build();