From ace0416ea3924221a223322df6dcbc083bebf906 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Mon, 24 Apr 2023 15:53:11 +0800 Subject: [PATCH] * Adjust testcase for php5.3. --- module/testcase/model.php | 6 +++--- module/testcase/view/browse.html.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index a801c1ce90..093cf127f4 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -4516,7 +4516,7 @@ class testcaseModel extends model 'removeNamespace' => true, // Remove namespace from resulting keys 'namespaceSeparator' => ':', // Change separator to something other than a colon 'attributePrefix' => '', // Distinguish between attributes and nodes with the same name - 'alwaysArray' => [], // Array of XML tag names which should always become arrays + 'alwaysArray' => array(), // Array of XML tag names which should always become arrays 'autoArray' => true, // Create arrays for tags which appear more than once 'textContent' => 'text', // Key used for the text content of elements 'autoText' => true, // Skip textContent key if node has no attributes or child nodes @@ -4529,7 +4529,7 @@ class testcaseModel extends model $namespaces[''] = null; // Add empty base namespace /* Get attributes from all namespaces. */ - $attributesArray = []; + $attributesArray = array(); foreach($namespaces as $prefix => $namespace) { if($options['removeNamespace']) $prefix = ''; @@ -4545,7 +4545,7 @@ class testcaseModel extends model } // Get child nodes from all namespaces - $tagsArray = []; + $tagsArray = array(); foreach($namespaces as $prefix => $namespace) { if($options['removeNamespace']) $prefix = ''; diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 511f8c8c15..760712b5aa 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -387,7 +387,7 @@ $('#module' + moduleID).closest('li').addClass('active'); $('#' + caseBrowseType + 'Tab').addClass('btn-active-text').find('.text').after(" recTotal;?>"); function runAutocase() { - var caseIDList = []; + var caseIDList = array(); $.each($('input[name^=caseIDList]:checked'),function(){ caseIDList.push($(this).val()); }); @@ -452,8 +452,8 @@ function toOrder(sourceId,targetId) { if(!checkProduct(sourceId, targetId)) return; - var origOrders = []; - var newOrders = []; + var origOrders = array(); + var newOrders = array(); var productID = 0; $('#caseTableList > tr').each(function(i, elem){