From 00e6f1716eb1352ef0ae9175ba04b6d4d6332a79 Mon Sep 17 00:00:00 2001 From: gorokh Date: Thu, 14 Nov 2019 18:06:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BF=D1=83=D1=81=D1=82=D1=8B=D1=85=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- intaro.retailcrm/classes/general/RestNormalizer.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/intaro.retailcrm/classes/general/RestNormalizer.php b/intaro.retailcrm/classes/general/RestNormalizer.php index 0e751894..fe08ff4d 100644 --- a/intaro.retailcrm/classes/general/RestNormalizer.php +++ b/intaro.retailcrm/classes/general/RestNormalizer.php @@ -15,7 +15,7 @@ class RestNormalizer { public $clear = true; private $validation = array(); - private $originalValidation = array(); + private $originalValidation = array(); private $server; /** @@ -67,7 +67,7 @@ class RestNormalizer RCrmActions::eventLog('RestNormalizer', 'intaro.retailcrm', 'Incorrect file normalize.'); return false; } - + if (is_string($data)) { $data = json_decode($data, true); } @@ -332,6 +332,9 @@ class RestNormalizer if (is_array($data)) { foreach ($data as $code => $value) { + if (is_array($value)) { + $value = array_diff($value, array('', NULL)); + } $data[$APPLICATION->ConvertCharset($code, SITE_CHARSET, 'utf-8')] = is_array($value) ? $this->multiConvert($value) : $APPLICATION->ConvertCharset($value, SITE_CHARSET, 'utf-8'); @@ -344,4 +347,4 @@ class RestNormalizer return $data; } } -?> \ No newline at end of file +?>