Skip to content

Commit 8ef43ce

Browse files
committed
FIX: Deprecated: Optional parameter $options declared before required
parameter $platforms is implicitly treated as a required parameter in resultsByStatus.php on line 525 (buildMatrix)
1 parent 8a30411 commit 8ef43ce

1 file changed

Lines changed: 14 additions & 18 deletions

File tree

lib/results/resultsByStatus.php

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@
1313
*
1414
*
1515
*/
16-
require('../../config.inc.php');
17-
18-
// Must be included BEFORE common.php
19-
require_once('../../third_party/codeplex/PHPExcel.php');
20-
21-
require_once('common.php');
22-
require_once('displayMgr.php');
23-
require_once('users.inc.php');
24-
require_once('exttable.class.php');
25-
require_once('exec.inc.php'); // used for bug string lookup
16+
require_once '../../config.inc.php';
17+
require_once '../../third_party/codeplex/PHPExcel.php'; // Must be included BEFORE common.php
18+
require_once 'common.php';
19+
require_once 'displayMgr.php';
20+
require_once 'users.inc.php';
21+
require_once 'exttable.class.php';
22+
require_once 'exec.inc.php'; // used for bug string lookup
2623

2724
// IMPORTANT NOTICE/WARNING about XLS generation
2825
// Seams that \n are not liked
@@ -62,8 +59,8 @@ function initScript(&$dbH) {
6259

6360
// done here in order to get some config about images
6461
$smarty = new TLSmarty();
65-
if (!is_null($metrics) and count($metrics) > 0) {
66-
if ($args->addOpAccess) {
62+
if (!is_null($metrics) && !empty($metrics)) {
63+
if ($args->addOpAccess) {
6764
$links = featureLinks($labels,$smarty->getImages());
6865
}
6966

@@ -305,8 +302,7 @@ function initScript(&$dbH) {
305302
'format' => $args->format,
306303
'show_platforms' => $gui->show_platforms);
307304

308-
$gui->tableSet[] = buildMatrix($gui->dataSet, $args, $tableOpt ,
309-
$gui->platformSet,$cfSet);
305+
$gui->tableSet[] = buildMatrix($gui->dataSet, $args, $gui->platformSet, $tableOpt, $cfSet);
310306
break;
311307
}
312308

@@ -522,7 +518,7 @@ function buildMailCfg(&$guiObj)
522518
* return tlExtTable
523519
*
524520
*/
525-
function buildMatrix($dataSet, &$args, $options = array(), $platforms,$customFieldColumns=null)
521+
function buildMatrix($dataSet, &$args, $platforms, $options = array(), $customFieldColumns=null)
526522
{
527523
$default_options = array('bugInterfaceOn' => false,'show_platforms' => false,
528524
'status_not_run' => false,'format' => FORMAT_HTML);
@@ -910,10 +906,10 @@ function xlsStepOne($oj,$style,$lbl,$gui)
910906
foreach($lines2write as $zdx => $fields)
911907
{
912908
$cdx = $zdx+1;
913-
$oj->setActiveSheetIndex(0)->setCellValue("A{$cdx}", current($fields))
914-
->setCellValue("B{$cdx}", end($fields));
909+
$oj->setActiveSheetIndex(0)->setCellValue("A[$cdx]", current($fields))
910+
->setCellValue("B[$cdx]", end($fields));
915911
}
916-
$cellArea .= "A{$cdx}";
912+
$cellArea .= "A[$cdx]";
917913
$oj->getActiveSheet()->getStyle($cellArea)
918914
->applyFromArray($style['ReportContext']);
919915

0 commit comments

Comments
 (0)