diff options
author | Ryan Gordon <ryan@quizlet.com> | 2017-08-02 07:43:27 -0700 |
---|---|---|
committer | Paul Yang <TeBoring@users.noreply.github.com> | 2017-08-02 07:43:27 -0700 |
commit | 9df89ccabcf8ad7d634009a00faf0e9ba153bdb7 (patch) | |
tree | 440b54492aae9df0d59ebba2df95a55299175f30 /php/src/Google/Protobuf | |
parent | c15a3269f9dea81db5a45b527cd8699f11b03f0b (diff) | |
download | protobuf-9df89ccabcf8ad7d634009a00faf0e9ba153bdb7.tar.gz protobuf-9df89ccabcf8ad7d634009a00faf0e9ba153bdb7.tar.bz2 protobuf-9df89ccabcf8ad7d634009a00faf0e9ba153bdb7.zip |
Fixing HHVM Compatibility (#3437)
Diffstat (limited to 'php/src/Google/Protobuf')
-rw-r--r-- | php/src/Google/Protobuf/Internal/Message.php | 6 |
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(); |