•  
      request #28250 Crash when calling GET /api/git/:id/commits/:ref with an invalid reference
    Infos
    #28250
    Thomas Gerbet (tgerbet)
    2022-08-18 10:34
    2022-08-17 17:17
    29814
    Details
    Crash when calling GET /api/git/:id/commits/:ref with an invalid reference

    Trace:

    PHP Fatal error:  Uncaught TypeError: Tuleap\Git\REST\v1\GitCommitRepresentation::__construct(): Argument #6 ($authored_date) must be of type string, null given, called in /usr/share/tuleap/plugins/git/include/REST/v1/GitCommitRepresentationBuilder.php on line 134 and defined in /usr/share/tuleap/plugins/git/include/REST/v1/GitCommitRepresentation.php:51
    Stack trace:
    #0 /usr/share/tuleap/plugins/git/include/REST/v1/GitCommitRepresentationBuilder.php(134): Tuleap\Git\REST\v1\GitCommitRepresentation->__construct()
    #1 /usr/share/tuleap/plugins/git/include/REST/v1/GitCommitRepresentationBuilder.php(90): Tuleap\Git\REST\v1\GitCommitRepresentationBuilder->buildGitCommitRepresentation()
    #2 /usr/share/tuleap/plugins/git/include/REST/v1/RepositoryResource.class.php(1101): Tuleap\Git\REST\v1\GitCommitRepresentationBuilder->build()
    #3 [internal function]: Tuleap\Git\REST\v1\RepositoryResource->getCommits()
    #4 /usr/share/tuleap/src/vendor/luracast/restler/vendor/Luracast/Restler/Restler.php(1065)
    
    SCM/Git
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2022-08-18
    Attachments
    Empty
    References

    Follow-ups