From f6a1ea4859b8fcd03c988cf2940a0c65944329f6 Mon Sep 17 00:00:00 2001 From: mmoreram Date: Thu, 26 Mar 2015 23:50:54 +0100 Subject: [PATCH 1/2] Assigned default value to array * For strict configurations of PHP, we were accessing to a non-array element --- lib/Doctrine/ORM/Query/Filter/SQLFilter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Doctrine/ORM/Query/Filter/SQLFilter.php b/lib/Doctrine/ORM/Query/Filter/SQLFilter.php index 3c6daaaad..507493a54 100644 --- a/lib/Doctrine/ORM/Query/Filter/SQLFilter.php +++ b/lib/Doctrine/ORM/Query/Filter/SQLFilter.php @@ -56,6 +56,7 @@ abstract class SQLFilter final public function __construct(EntityManagerInterface $em) { $this->em = $em; + $this->parameters = array(); } /** From 9a2afd1a9a3099a0696baaf19bc2d0f0f2889c87 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 31 Mar 2015 22:02:48 +0100 Subject: [PATCH 2/2] #1350 - `parameters` should be an `array` by default --- lib/Doctrine/ORM/Query/Filter/SQLFilter.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Filter/SQLFilter.php b/lib/Doctrine/ORM/Query/Filter/SQLFilter.php index 507493a54..b0248fbac 100644 --- a/lib/Doctrine/ORM/Query/Filter/SQLFilter.php +++ b/lib/Doctrine/ORM/Query/Filter/SQLFilter.php @@ -46,7 +46,7 @@ abstract class SQLFilter * * @var array */ - private $parameters; + private $parameters = []; /** * Constructs the SQLFilter object. @@ -56,7 +56,6 @@ abstract class SQLFilter final public function __construct(EntityManagerInterface $em) { $this->em = $em; - $this->parameters = array(); } /**