From da418e82bc90969b9073caf50ef51630fabe1684 Mon Sep 17 00:00:00 2001 From: Brendon Date: Thu, 30 May 2019 15:25:25 -0400 Subject: [PATCH] bugfix: remove empty array values from parition key properties --- src/QueryBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QueryBuilder.php b/src/QueryBuilder.php index fb127f1..acb0c49 100644 --- a/src/QueryBuilder.php +++ b/src/QueryBuilder.php @@ -340,7 +340,7 @@ public function findPartitionValue(object $document, bool $toString = false) if ($this->isNested($this->partitionKey)) { # explode the key into its properties - $properties = explode("/", $this->partitionKey); + $properties = array_values(array_filter(explode("/", $this->partitionKey))); # return the property structure # formatted as a cosmos query string