Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Commit

Permalink
getColumnInfo for unexistent columns without warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Jan 16, 2019
1 parent ba5737a commit f3cc6c4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/FlexiPeeHP/FlexiBeeRO.php
Expand Up @@ -1301,7 +1301,7 @@ public function getFlexiData($suffix = null, $conditions = null)
$finalUrl .= http_build_query($urlParams, null, '&',
PHP_QUERY_RFC3986);
}

$transactions = $this->performRequest($finalUrl, 'GET');
$responseEvidence = $this->getResponseEvidence();
if (is_array($transactions) && array_key_exists($responseEvidence,
Expand Down Expand Up @@ -1970,7 +1970,7 @@ function getPrevRecordID($conditions = [])
return (is_array($prev) && array_key_exists(0, $prev) && array_key_exists('id',
$prev[0])) ? intval($prev[0]['id']) : null;
}

/**
* Vrací hodnotu daného externího ID
*
Expand Down Expand Up @@ -2174,8 +2174,9 @@ public function getColumnInfo($column, $evidence = null)
{
$columnsInfo = $this->getColumnsInfo(empty($evidence) ? $this->getEvidence()
: $evidence);
return is_array($columnsInfo) ? array_key_exists($column, $columnsInfo) ? $columnsInfo[$column]
: null : null;
return (empty($column) || empty($columnsInfo) || !is_array($columnsInfo))
? null : array_key_exists($column, $columnsInfo) ? $columnsInfo[$column]
: null;
}

/**
Expand Down

0 comments on commit f3cc6c4

Please sign in to comment.