mantisbt-plugins / source-integration

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitea, Gitweb, Cgit, Subversion, Mercurial and more
http://noswap.com/projects/source-integration/
MIT License
181 stars 130 forks source link

HgWeb: changeset import causes SQL error if server is not responding #248

Closed dregad closed 7 years ago

dregad commented 7 years ago
APPLICATION ERROR #401

Database query failed. Error received from database was #1048: Column 'revision' cannot be null for the query: INSERT INTO mantis_plugin_Source_changeset_table ( repo_id, revision, parent, branch, user_id,
timestamp, author, message, info, ported, author_email, committer, committer_email, committer_id
) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ).

The page layout is garbled and several PHP notices are displayed.

dregad commented 7 years ago

This is caused by url_get() returning 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.