Merge pull request #88 from Evgeniy-Goroh/master
добавлена обработка пустых полей
This commit is contained in:
commit
0ca164a825
@ -332,6 +332,9 @@ class RestNormalizer
|
|||||||
|
|
||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
foreach ($data as $code => $value) {
|
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)
|
$data[$APPLICATION->ConvertCharset($code, SITE_CHARSET, 'utf-8')] = is_array($value)
|
||||||
? $this->multiConvert($value)
|
? $this->multiConvert($value)
|
||||||
: $APPLICATION->ConvertCharset($value, SITE_CHARSET, 'utf-8');
|
: $APPLICATION->ConvertCharset($value, SITE_CHARSET, 'utf-8');
|
||||||
|
Loading…
Reference in New Issue
Block a user