From 74feb195c18f642aa36ab52da7664d0e42794906 Mon Sep 17 00:00:00 2001 From: Vaidas Bagdonas Date: Tue, 18 Feb 2020 17:05:38 +0100 Subject: [PATCH] default allowed/ignored props to empty arrays --- .../Services/DocumentUpdater.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Comsave/SalesforceOutboundMessageBundle/Services/DocumentUpdater.php b/src/Comsave/SalesforceOutboundMessageBundle/Services/DocumentUpdater.php index 5a92c0b..95e0613 100644 --- a/src/Comsave/SalesforceOutboundMessageBundle/Services/DocumentUpdater.php +++ b/src/Comsave/SalesforceOutboundMessageBundle/Services/DocumentUpdater.php @@ -55,6 +55,8 @@ public function updateWithValues($document, array $newValues) public function updateWithDocument($document, $newDocument, ?array $allowedProperties = [], ?array $ignoredProperties = []) { $classReflection = new ReflectionClass($newDocument); + $allowedProperties = $allowedProperties ?: []; + $ignoredProperties = $ignoredProperties ?: []; $checkAllowedProperties = count($allowedProperties) > 0; $checkIgnoredProperties = count($ignoredProperties) > 0;