Skip to content

Commit 0f6b6c4

Browse files
committed
FIX Uncaught TypeError: count() in \lib\functions\testsuite.class.php on
line 1519, line 2004 and line 2012
1 parent a346b6f commit 0f6b6c4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/functions/testsuite.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ public function get_children($id,$options=null)
15161516
$my['options'] = array_merge($my['options'], (array)$options);
15171517

15181518
$subtree = $this->tree_manager->get_children($id, array('testcase' => 'exclude_me'));
1519-
if(!is_null($subtree) && count($subtree) > 0)
1519+
if(!empty($subtree))
15201520
{
15211521
foreach( $subtree as $the_key => $elem)
15221522
{
@@ -2001,15 +2001,15 @@ public function addKeywordsDeep($rootTestSuiteID,$kwSet) {
20012001
// the new ones.
20022002
foreach($kwForTS as $tsk => $kwVenn) {
20032003
$kw2add = array_diff($kwSet,$kwVenn);
2004-
if( count($kw2add) > 0 ) {
2004+
if( !empty($kw2add) ) {
20052005
foreach($kw2add as $kaboom) {
20062006
$vv[] = "($tsk,'nodes_hierarchy',$kaboom)";
20072007
}
20082008
}
20092009
}
20102010
}
20112011

2012-
if( count($vv) > 0 ) {
2012+
if(!empty($vv)) {
20132013
$sql = "/* $debugMsg */
20142014
INSERT INTO {$this->tables['object_keywords']}
20152015
(fk_id,fk_table,keyword_id)

0 commit comments

Comments
 (0)