Skip to content
Permalink
Browse files

fix PHP 7.4.1 warnings

  • Loading branch information
fmancardi committed Dec 28, 2019
1 parent f7db152 commit b75ec516aeb5b49998de086a31c67c4382587f59
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/functions/testproject.class.php
@@ -418,12 +418,12 @@ public function get_by_id($id, $opt=null)
*/
public function get_by_prefix($prefix, $addClause = null)
{
$safe_prefix = $this->db->prepare_string($prefix);
$safe_prefix = $this->db->prepare_string($prefix);
$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;
}


@@ -3141,7 +3141,7 @@ function _get_subtree_rec($node_id,&$pnode,$filters = null, $options = null) {
$sql .= " ORDER BY NH.node_order,NH.id";

// Approach Change - get all
$rs = $this->db->fetchRowsIntoMap($sql,'id');
$rs = (array)$this->db->fetchRowsIntoMap($sql,'id');
if( count($rs) == 0 ) {
return $qnum;
}

0 comments on commit b75ec51

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