Tuleap 16 est là ! Assistez à l'événement virtuel le 17 octobre à 10h30. Inscrivez-vous ici !

    •  
      request #33313 PHP Warning in GET projects
    Infos
    #33313
    Joris MASSON (jmasson)
    2023-07-19 08:48
    2023-07-18 10:40
    34911
    Details
    PHP Warning in GET projects

    When I open the "Move artifact" modal, it fails to load the list of projects (and does not show an error message...) because the response of the REST route to load projects breaks JSON encoding. It starts with a PHP Warning:

    <br/><b>Warning</b>:  Trying to access array offset on value of type null in <b>/usr/share/tuleap/src/common/tracker/ArtifactType.class.php</b> on line <b>256</b><br/>
    

    Throwing an exception at this place produces the following stack trace:

    2023-07-18T08:43:40+00:00 [3483] [error] Unhandled exception: Aaaah:
    #0 /usr/share/tuleap/src/common/tracker/ArtifactType.class.php(778): ArtifactType->getID()
    #1 /usr/share/tuleap/src/www/project/admin/ugroup_utils.php(296): ArtifactType->userIsAdmin()
    #2 /usr/share/tuleap/src/common/User/User.class.php(418): ugroup_user_is_member()
    #3 /usr/share/tuleap/plugins/tracker/include/Tracker/Tracker.class.php(1967): PFUser->isMemberOfUGroup()
    #4 /usr/share/tuleap/plugins/tracker/include/Tracker/TrackerFactory.class.php(221): Tracker->userIsAdmin()
    #5 /usr/share/tuleap/plugins/tracker/include/trackerPlugin.php(2395): TrackerFactory->getTrackersByProjectIdUserCanAdministration()
    #6 /usr/share/tuleap/src/common/Event/EventManager.class.php(128): trackerPlugin->getProjectWithTrackerAdministrationPermission()
    #7 /usr/share/tuleap/src/common/Plugin/PluginLoader.php(73): EventManager->eventManagerDispatch()
    #8 /usr/share/tuleap/src/common/Event/EventManager.class.php(117): Tuleap\Plugin\PluginLoader->Tuleap\Plugin\{closure}()
    #9 /usr/share/tuleap/src/common/Event/EventManager.class.php(147): EventManager->processEventOnListener()
    #10 /usr/share/tuleap/src/common/Event/EventManager.class.php(99): EventManager->dispatch()
    #11 /usr/share/tuleap/src/common/Project/REST/v1/ProjectResource.class.php(533): EventManager->processEvent()
    #12 /usr/share/tuleap/src/common/Project/REST/v1/ProjectResource.class.php(461): Tuleap\Project\REST\v1\ProjectResource->getMyAndPublicProjectsFromExactMatch()
    #13 [internal function]: Tuleap\Project\REST\v1\ProjectResource->get()
    #14 /usr/share/tuleap/src/vendor/luracast/restler/vendor/Luracast/Restler/Restler.php(1065): call_user_func_array()
    #15 /usr/share/tuleap/src/vendor/luracast/restler/vendor/Luracast/Restler/Restler.php(304): Luracast\Restler\Restler->call()
    #16 /usr/share/tuleap/src/www/api/index.php(91): Luracast\Restler\Restler->handle()
    #17 {main}
    
    Trackers
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2023-07-19
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Joris MASSON (jmasson)2023-07-18 10:44
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes