Skip to content

Commit c7dcfd8

Browse files
authored
Merge pull request #696 from utopia-php/spatial-filter
updated array conditon for filter
2 parents 1bac5c6 + 4abe0ef commit c7dcfd8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Database/Database.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ function (?string $value) {
512512
* @return mixed
513513
*/
514514
function (mixed $value) {
515-
if (is_null($value)) {
516-
return;
515+
if (!is_array($value)) {
516+
return $value;
517517
}
518518
try {
519519
return self::encodeSpatialData($value, Database::VAR_LINESTRING);
@@ -539,8 +539,8 @@ function (?string $value) {
539539
* @return mixed
540540
*/
541541
function (mixed $value) {
542-
if (is_null($value)) {
543-
return;
542+
if (!is_array($value)) {
543+
return $value;
544544
}
545545
try {
546546
return self::encodeSpatialData($value, Database::VAR_POLYGON);

0 commit comments

Comments
 (0)