aboutsummaryrefslogtreecommitdiff
path: root/php/src/Google/Protobuf/Internal/Message.php
diff options
context:
space:
mode:
authorBo Yang <paulyang1211@gmail.com>2017-08-05 10:42:29 -0700
committerBo Yang <paulyang1211@gmail.com>2017-08-05 10:42:29 -0700
commit8f4b8e430a0cf087af423be434cf8d837027c651 (patch)
treea7a79a2ff33b31b9036eb378eb458928a0648481 /php/src/Google/Protobuf/Internal/Message.php
parentc2f69d6fa23a815948368fae0b8c1e56e50715c9 (diff)
parentf14703c933d04a4aac285c482bf828269bd0a151 (diff)
downloadprotobuf-8f4b8e430a0cf087af423be434cf8d837027c651.tar.gz
protobuf-8f4b8e430a0cf087af423be434cf8d837027c651.tar.bz2
protobuf-8f4b8e430a0cf087af423be434cf8d837027c651.zip
Merge branch 'master' into 3.4.x
Diffstat (limited to 'php/src/Google/Protobuf/Internal/Message.php')
-rw-r--r--php/src/Google/Protobuf/Internal/Message.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/php/src/Google/Protobuf/Internal/Message.php b/php/src/Google/Protobuf/Internal/Message.php
index 1ecd4fa2..e1009f2f 100644
--- a/php/src/Google/Protobuf/Internal/Message.php
+++ b/php/src/Google/Protobuf/Internal/Message.php
@@ -841,7 +841,6 @@ class Message
if (is_null($value)) {
continue;
}
- $getter = $field->getGetter();
$key_field = $field->getMessageType()->getFieldByNumber(1);
$value_field = $field->getMessageType()->getFieldByNumber(2);
foreach ($value as $tmp_key => $tmp_value) {
@@ -858,13 +857,12 @@ class Message
$this->convertJsonValueToProtoValue(
$tmp_value,
$value_field);
- $this->$getter()[$proto_key] = $proto_value;
+ self::kvUpdateHelper($field, $proto_key, $proto_value);
}
} else if ($field->isRepeated()) {
if (is_null($value)) {
continue;
}
- $getter = $field->getGetter();
foreach ($value as $tmp) {
if (is_null($tmp)) {
throw new \Exception(
@@ -872,7 +870,7 @@ class Message
}
$proto_value =
$this->convertJsonValueToProtoValue($tmp, $field);
- $this->$getter()[] = $proto_value;
+ self::appendHelper($field, $proto_value);
}
} else {
$setter = $field->getSetter();