Skip to content
Permalink
Browse files

fix PHP 7.4.1 warnings

  • Loading branch information
fmancardi committed Dec 28, 2019
1 parent 6f5dd3e commit e3c50da5d30a73d9bfcc816697a8b62fa69da58a
Showing with 16 additions and 10 deletions.
  1. +2 −2 lib/functions/testproject.class.php
  2. +14 −8 lib/functions/tlTestCaseFilterControl.class.php
@@ -420,8 +420,8 @@ public function get_by_prefix($prefix, $addClause = null) {
$condition = "testprojects.prefix='{$safe_prefix}'";
$condition .= is_null($addClause) ? '' : " AND {$addClause} ";

$result = $this->getTestProject($condition);
return $result[0];
$rs = $this->getTestProject($condition);
return $rs != null ? $rs[0] : null;
}


@@ -1488,7 +1488,8 @@ private function init_filter_keywords() {
$type_selection = $this->args->{$type};

// are there any keywords?
if (!is_null($keywords) && count($keywords)) {
$atLeastOneKW = !is_null($keywords) && count($keywords);
if ($atLeastOneKW) {
$this->filters[$key] = array();

if (!$selection || !$type_selection || $this->args->reset_filters) {
@@ -1513,14 +1514,19 @@ private function init_filter_keywords() {
$this->filters[$key][$type]['selected'] = $type_selection;
}

// set the active value to filter
// delete keyword filter if "any" (0) is part of the selection - regardless of filter mode
if (is_array($this->filters[$key]['selected']) && in_array(0, $this->filters[$key]['selected'])) {
$this->active_filters[$key] = null;
if ($atLeastOneKW) {

// set the active value to filter
// delete keyword filter if "any" (0) is part of the selection - regardless of filter mode
if (is_array($this->filters[$key]['selected']) && in_array(0, $this->filters[$key]['selected'])) {
$this->active_filters[$key] = null;
} else {
$this->active_filters[$key] = $this->filters[$key]['selected'];
}
$this->active_filters[$type] = $selection ? $type_selection : null;
} else {
$this->active_filters[$key] = $this->filters[$key]['selected'];
}
$this->active_filters[$type] = $selection ? $type_selection : null;
$this->active_filters[$key] = $this->filters[$key]['selected'];
}
}


0 comments on commit e3c50da

Please sign in to comment.
You can’t perform that action at this time.