diff --git a/SourceGithub/SourceGithub.php b/SourceGithub/SourceGithub.php index bb6a2d9..56ad5e4 100755 --- a/SourceGithub/SourceGithub.php +++ b/SourceGithub/SourceGithub.php @@ -190,6 +190,7 @@ $t_uri = $this->api_uri( $p_repo, 'rate_limit' ); $t_json = json_url( $t_uri, 'rate' ); + if ( false !== $t_json && !is_null( $t_json ) ) { if ( $t_json->remaining <= 0 ) { // do we need to do something here? @@ -333,8 +334,12 @@ $t_json = $this->api_json_url( $p_repo, $t_uri ); if ( false === $t_json || is_null( $t_json ) ) { + # Some error occured retrieving the commit echo "failed.\n"; continue; + } else if ( !property_exists( $t_json, 'sha' ) ) { + echo "failed ($t_json->message).\n"; + continue; } list( $t_changeset, $t_commit_parents ) = $this->json_commit_changeset( $p_repo, $t_json, $p_branch );