Permalink
Browse files

PHP 7 crash due to initializeGUI() arguments number

  • Loading branch information...
fmancardi committed Jan 31, 2019
1 parent 03cbdb0 commit 67fc17430b2e709a8f48363dc4422d6337ffd9ec
Showing with 9 additions and 4 deletions.
  1. +9 −4 lib/testcases/containerEdit.php
@@ -7,7 +7,7 @@
*
* @filesource containerEdit.php
* @package TestLink
* @copyright 2005-2018, TestLink community
* @copyright 2005-2019, TestLink community
* @link http://www.testlink.org
*
*/
@@ -1339,15 +1339,20 @@ function reorderTestSuitesDictionary($args,$treeMgr,$parent_id)
/**
*
*/
function initializeGui(&$objMgr,$id,$argsObj,$lbl) {
function initializeGui(&$objMgr,$id,$argsObj,$lbl=null) {
$guiObj = new stdClass();
$labels = $lbl;
if( null == $labels ) {
$labels = $argsObj->l10n;
}
$guiObj->id = $id;
$guiObj->user = $argsObj->user;
$guiObj->tproject_id = $argsObj->tprojectID;
$guiObj->refreshTree = $argsObj->refreshTree;
$guiObj->btn_reorder_testcases = $lbl['btn_reorder_testcases'];
$guiObj->page_title = $lbl['container_title_testsuite'];
$guiObj->btn_reorder_testcases = $labels['btn_reorder_testcases'];
$guiObj->page_title = $labels['container_title_testsuite'];
$guiObj->attachments = getAttachmentInfosFrom($objMgr,$id);
$guiObj->form_token = $argsObj->treeFormToken;

0 comments on commit 67fc174

Please sign in to comment.