RedisClient::executeCommand() uses Redis::rawCommand() and Redis::rawCommand() may return false. Therefore $rawResults may contains false and it will throws the error when false put to foreach
|
$rawResults = $this->redis->executeCommand(array_merge($params, $this->getAggregationParams($rule))); |
$rawResults = $this->redis->executeCommand(array_merge($params, $this->getAggregationParams($rule)));
$samples = [];
foreach ($rawResults as $rawResult) {
$samples[] = Sample::createFromTimestamp($key, (float)$rawResult[1], (int)$rawResult[0]);
}