Skip to content

Commit 39a4dbe

Browse files
committed
HgWeb: fix uncaught error when url_get() fails
url_get() returns null, not false, so the strict-type check performed after attempting to retrieve changeset data from HgWeb fails and code attempts to call commit_changeset() with no data, causing an SQL error. Removing strict-type check ensures the failed url_get() call is handled properly. Fixes #248
1 parent c5910b4 commit 39a4dbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SourceHgWeb/SourceHgWeb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private function import_commits( $p_repo, $p_uri_base, $p_commit_ids, $p_branch=
214214
$t_commit_url = $this->uri_base( $p_repo ) . 'raw-rev/' . $t_commit_id;
215215
$t_input = url_get( $t_commit_url );
216216

217-
if ( false === $t_input ) {
217+
if( !$t_input ) {
218218
echo "failed.\n";
219219
continue;
220220
}

0 commit comments

Comments
 (0)