From c5213dd970e74f051f757d6a16fc98e2b1b9d791 Mon Sep 17 00:00:00 2001 From: nickender <41143877+nickender@users.noreply.github.com> Date: Sun, 22 Jul 2018 22:26:57 +0700 Subject: [PATCH] FIX properties setting bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Исправление ошибки установки значений свойствам для которых не определен в карте свойств установщик. --- src/Api/Entity.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Api/Entity.php b/src/Api/Entity.php index f802b81..3340f09 100644 --- a/src/Api/Entity.php +++ b/src/Api/Entity.php @@ -43,7 +43,10 @@ public function __construct($properties = null) if (isset($this->propertiesMap[$propName])) { $setterName = $this->propertiesMap[$propName]; $this->$setterName($propValue); - } + } else { + if (property_exists(get_class($this), $propName)) { + $this->$propName = $propValue; + } } } }