Skip to content

Commit

Permalink
Merge pull request baopham#226 from fd-automox/7.4-fix
Browse files Browse the repository at this point in the history
Fix an invalid array access and enable CI for PHP 7.4
  • Loading branch information
JackPriceBurns authored Sep 30, 2020
2 parents 0d12b73 + b9217ae commit e5290d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ stages:
php:
- '7.2'
- '7.3'
- '7.4'

before_script:
- java -Djava.library.path=./DynamoDBLocal_lib -jar dynamodb_local/DynamoDBLocal.jar --port 3000 &
Expand Down
10 changes: 4 additions & 6 deletions src/ConditionAnalyzer/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,13 @@ private function getIndex()

private function hasValidQueryOperator($hash, $range = null)
{
$hashCondition = $this->getCondition($hash);

$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator($hashCondition['type'] ?? null);
$hashConditionType = $this->getCondition($hash)['type'] ?? null;
$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator($hashConditionType);

if ($validQueryOp && $range) {
$rangeCondition = $this->getCondition($range);

$rangeConditionType = $this->getCondition($range)['type'] ?? null;
$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator(
$rangeCondition['type'],
$rangeConditionType,
true
);
}
Expand Down

0 comments on commit e5290d8

Please sign in to comment.