diff --git a/SourceGithub/SourceGithub.php b/SourceGithub/SourceGithub.php index 62a0d06..c06e28c 100644 --- a/SourceGithub/SourceGithub.php +++ b/SourceGithub/SourceGithub.php @@ -292,14 +292,14 @@ $t_changesets = array(); - while( count( $t_parents ) > 0 && $s_counter < 200 ) { + while( count( $s_parents ) > 0 && $s_counter < 200 ) { $t_commit_id = array_shift( $s_parents ); echo "Retrieving $t_commit_id ... "; $t_uri = $p_uri_base . 'commit/' . $t_commit_id; $t_json = json_url( $t_uri, 'commit' ); - if ( false === $t_json ) { + if ( false === $t_json || is_null( $t_json ) ) { echo "failed.\n"; continue; }