Skip to content

Commit c054ebb

Browse files
committed
Fix an invalid array access and enable CI for PHP 7.4
1 parent 3c85a7b commit c054ebb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
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

+5-2
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,13 @@ private function hasValidQueryOperator($hash, $range = null)
204204
$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator($hashCondition['type'] ?? null);
205205

206206
if ($validQueryOp && $range) {
207-
$rangeCondition = $this->getCondition($range);
207+
$rangeConditionType = $this->getCondition($range)['type'] ?? null;
208+
if ($rangeConditionType === null) {
209+
return false;
210+
}
208211

209212
$validQueryOp = ComparisonOperator::isValidQueryDynamoDbOperator(
210-
$rangeCondition['type'],
213+
$rangeConditionType,
211214
true
212215
);
213216
}

0 commit comments

Comments
 (0)