The document manager plugin crashes when the group_id parameter is missing. Even if the request is not valid, Tuleap should not crash with a PHP fatal error.
Typical trace extracted from tuleap.net logs:
2018/12/18 23:07:50 [error] 10629#0: *74520 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: docman in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37
PHP message: PHP Notice: Trying to get property 'plugin' of non-object in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37
PHP message: PHP Fatal error: Uncaught Error: Call to a member function getServiceShortname() on null in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php:37
Stack trace:
#0 /usr/share/tuleap/plugins/docman/include/view/Docman_View_View.class.php(48): Docman_View_Header->_header(Array)
#1 /usr/share/tuleap/plugins/docman/include/Docman_Controller.class.php(1715): Docman_View_View->display(Array)
#2 /usr/share/tuleap/src/common/mvc/Controler.class.php(62): Docman_Controller->viewsManagement()
#3 /usr/share/tuleap/plugins/docman/include/docmanPlugin.class.php(386): Controler->process()
#4 /usr/share/tuleap/plugins/docman/www/index.php(30): DocmanPlugin->process()
#5 {main}
thrown in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37" while reading response header from upstream, client: YYYYYYYYYY, server: tuleap.net, request: "GET /plugins/do
cman/?action=search&id=29&advsearch=0&sort_title=1&sort_description=0&sort_owner=0&sort_update_date=1 HTTP/1.1", upstream: "
fastcgi://XXXXXXXXXXX", host: "tuleap.net"
2018/12/18 23:08:01 [error] 10629#0: *74520 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: docman in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37
PHP message: PHP Notice: Trying to get property 'plugin' of non-object in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37
PHP message: PHP Fatal error: Uncaught Error: Call to a member function getServiceShortname() on null in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php:37
Stack trace:
#0 /usr/share/tuleap/plugins/docman/include/view/Docman_View_View.class.php(48): Docman_View_Header->_header(Array)
#1 /usr/share/tuleap/plugins/docman/include/Docman_Controller.class.php(1715): Docman_View_View->display(Array)
#2 /usr/share/tuleap/src/common/mvc/Controler.class.php(62): Docman_Controller->viewsManagement()
#3 /usr/share/tuleap/plugins/docman/include/docmanPlugin.class.php(386): Controler->process()
#4 /usr/share/tuleap/plugins/docman/www/index.php(30): DocmanPlugin->process()
#5 {main}
thrown in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37" while reading response header from upstream, client: YYYYYYYYYY, server: tuleap.net, request: "GET /plugins/do
cman/?action=search&id=29&advsearch=1&sort_title=1&sort_description=0&sort_owner=1&sort_update_date=1&start=0 HTTP/1.1", upstream: "
fastcgi://XXXXXXXXXXX", host: "tuleap.net"
2018/12/18 23:08:06 [error] 10629#0: *74520 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: docman in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37
PHP message: PHP Notice: Trying to get property 'plugin' of non-object in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37
PHP message: PHP Fatal error: Uncaught Error: Call to a member function getServiceShortname() on null in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php:37
Stack trace:
#0 /usr/share/tuleap/plugins/docman/include/view/Docman_View_View.class.php(48): Docman_View_Header->_header(Array)
#1 /usr/share/tuleap/plugins/docman/include/Docman_Controller.class.php(1715): Docman_View_View->display(Array)
#2 /usr/share/tuleap/src/common/mvc/Controler.class.php(62): Docman_Controller->viewsManagement()
#3 /usr/share/tuleap/plugins/docman/include/docmanPlugin.class.php(386): Controler->process()
#4 /usr/share/tuleap/plugins/docman/www/index.php(30): DocmanPlugin->process()
#5 {main}
thrown in /usr/share/tuleap/plugins/docman/include/view/Docman_View_Header.class.php on line 37" while reading response header from upstream, client: YYYYYYYYYY, server: tuleap.net, request: "GET /plugins/do
cman/?action=search&id=248&sort_title=1&sort_owner=0&sort_update_date=1&sort_description=1 HTTP/1.1", upstream: "
fastcgi://XXXXXXXXXXX", host: "tuleap.net"