Skip to content

Commit e5290d8

Browse files
Merge pull request #226 from fd-automox/7.4-fix
Fix an invalid array access and enable CI for PHP 7.4
2 parents 0d12b73 + b9217ae commit e5290d8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ stages:
99
php:
1010
- '7.2'
1111
- '7.3'
12+
- '7.4'
1213

1314
before_script:
1415
- java -Djava.library.path=./DynamoDBLocal_lib -jar dynamodb_local/DynamoDBLocal.jar --port 3000 &

src/ConditionAnalyzer/Analyzer.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,13 @@ private function getIndex()
199199

200200
private function hasValidQueryOperator($hash, $range = null)
201201
{
202-
$hashCondition = $this->getCondition($hash);
203-
204-
$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator($hashCondition['type'] ?? null);
202+
$hashConditionType = $this->getCondition($hash)['type'] ?? null;
203+
$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator($hashConditionType);
205204

206205
if ($validQueryOp && $range) {
207-
$rangeCondition = $this->getCondition($range);
208-
206+
$rangeConditionType = $this->getCondition($range)['type'] ?? null;
209207
$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator(
210-
$rangeCondition['type'],
208+
$rangeConditionType,
211209
true
212210
);
213211
}

0 commit comments

Comments
 (0)