•  
      request #35828 Crash when handling a malformed PR cross ref
    Infos
    #35828
    Thomas Gerbet (tgerbet)
    2024-01-05 15:11
    2024-01-05 10:07
    37403
    Details
    Crash when handling a malformed PR cross ref

    Put pr # a (without the space) in a field transforming the cross references (e.g. a tracker text field) to reproduce the crash.

    Trace:

    PHP Fatal error:  Uncaught TypeError: Tuleap\PullRequest\PullRequestRetriever::getPullRequestById(): Argument #1 ($id) must be of type int, string given, called in /usr/share/tuleap/plugins/pullrequest/include/PullRequest/Reference/ReferenceFactory.php on line 39 and defined in /usr/share/tuleap/plugins/pullrequest/include/PullRequest/PullRequestRetriever.php:39
    Stack trace:
    #0 /usr/share/tuleap/plugins/pullrequest/include/PullRequest/Reference/ReferenceFactory.php(39): Tuleap\PullRequest\PullRequestRetriever->getPullRequestById()
    #1 /usr/share/tuleap/plugins/pullrequest/include/pullrequestPlugin.php(372): Tuleap\PullRequest\Reference\ReferenceFactory->getReferenceByPullRequestId()
    #2 /usr/share/tuleap/src/common/Event/EventManager.class.php(128): pullrequestPlugin->getReference()
    #3 /usr/share/tuleap/src/common/Plugin/PluginLoader.php(73): EventManager->eventManagerDispatch()
    
    Pull Request
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2024-01-05
    Attachments
    Empty
    References
    Referencing request #35828
    Referenced by request #35828

    Artifact Tracker v5

    rel #35497 15.5

    Follow-ups

    User avatar

    Integrated into Tuleap 15.4.99.23


    • Status changed from Under review to Closed
    • Connected artifacts
    • Close date set to 2024-01-05