Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
9df89cca
Commit
9df89cca
authored
7 years ago
by
Ryan Gordon
Committed by
Paul Yang
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing HHVM Compatibility (#3437)
parent
c15a3269
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
Message.php
php/src/Google/Protobuf/Internal/Message.php
+2
-4
No files found.
php/src/Google/Protobuf/Internal/Message.php
View file @
9df89cca
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment