Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • E extensions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • repos
  • phabricator
  • extensions
  • Merge requests
  • !4

GitLabPatchesCustomField: check array indices before use

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Brennen Bearnes requested to merge work/robustify-mr-widget into wmf/stable Mar 20, 2023
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

We never want a situation where an unexpected return value from the GitLab search API throws an exception that renders the rest of the page un-viewable. This should at least be a bit more robust.

I note that isset() here would also return false on encountering a PHP null, but I believe that'd also indicate a weird return situation.

Also makes all early returns from the data-fetching function arrays, instead of mixing type.

Bug: T332607

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/robustify-mr-widget