-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hi, I'm using version 2.5.2 since we are running on PHP 7.4.
I ran into this issue - when I do a query on a none "id" field, it fails, for example like this:
$jsonResult = QueryBuilder::instance()
->setCollection($collection)
->select('c')
->where('c.email = @email')
->params(['@email' => '[email protected]'])
->setPartitionKey('id')
->find(TRUE)->toJson();
This is working in a PHP 8 codebase with version 2.6.0 if I use the same query.
In 2.5.2. it is specifically failing on this line (line 265) in CosmosDb.php:
public function getPkRanges($rid_id, $rid_col)
{
$headers = $this->getAuthHeaders('GET', 'pkranges', $rid_col);
$headers['Accept'] = 'application/json';
$headers['x-ms-max-item-count'] = -1;
$result = $this->request("/dbs/{$rid_id}/colls/{$rid_col}/pkranges", "GET", $headers);
return json_decode($result);
}
The last line return json_decode($result); should be return json_decode($result->getBody()->getContents()); (it is like that in 2.6.0 but not in 2.5.2).
Can this be fixed please in 2.5.2? Or any advice if I'm doing something wrong? Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
