Skip to content

Commit 9ea221b

Browse files
committed
#9381: XMLRPS write exec test plans w/o platforms
1 parent 6119e98 commit 9ea221b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/api/xmlrpc/v1/xmlrpc.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,12 +2670,12 @@ public function reportTCResult($args) {
26702670

26712671
if($status_ok) {
26722672
// This check is needed only if test plan has platforms
2673-
$platformSet = $this->tplanMgr->getPlatforms( $this->args[self::$testPlanIDParamName], array(
2673+
$platformSet = (array)$this->tplanMgr->getPlatforms( $this->args[self::$testPlanIDParamName], array(
26742674
'outputFormat' => 'map'
26752675
) );
26762676
$targetPlatform = null;
26772677

2678-
if(! is_null( $platformSet )) {
2678+
if(count($platformSet) > 0) {
26792679
$status_ok = $this->checkPlatformIdentity( $this->args[self::$testPlanIDParamName], $platformSet, $msg_prefix );
26802680
if($status_ok) {
26812681
$targetPlatform[$this->args[self::$platformIDParamName]] = $platformSet[$this->args[self::$platformIDParamName]];
@@ -3554,8 +3554,8 @@ public function addTestCaseToTestPlan($args) {
35543554
$opt = array(
35553555
'outputFormat' => 'mapAccessByID'
35563556
);
3557-
$platformSet = $this->tplanMgr->getPlatforms( $tplan_id, $opt );
3558-
$hasPlatforms = ! is_null( $platformSet );
3557+
$platformSet = (arrya)$this->tplanMgr->getPlatforms( $tplan_id, $opt );
3558+
$hasPlatforms = (count( $platformSet ) > 0);
35593559
$hasPlatformIDArgs = $this->_isParamPresent( self::$platformIDParamName );
35603560

35613561
if($hasPlatforms) {

0 commit comments

Comments
 (0)