From 03b16ffaf57ba13a4ddad66fd55942fe190e3fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Jonu=C5=A1as?= <mantas.jonusas@nfq.lt> Date: Mon, 23 Mar 2015 13:23:17 +0200 Subject: [PATCH] Addded additional checking for nestedFilter --- Sort/Sort.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sort/Sort.php b/Sort/Sort.php index 04be3b2..a21946e 100644 --- a/Sort/Sort.php +++ b/Sort/Sort.php @@ -32,7 +32,9 @@ class Sort extends AbstractSort public function __construct($field, $order = self::ORDER_ASC, BuilderInterface $nestedFilter = null, $mode = null) { parent::__construct($field, $order, $mode); - $this->setNestedFilter($nestedFilter); + if ($nestedFilter) { + $this->setNestedFilter($nestedFilter); + } } /** -- GitLab