Handle optional fields correctly in Message_get method (#18982)
Refactor the Message_get method to accurately handle optional fields with presence checks by returning NULL if the field is not set. Also, add new unit tests in WellKnownTest.php to ensure correct behavior of reflection properties for optional fields with various data types.
should fix https://github.com/protocolbuffers/protobuf/issues/18966
Closes #18982
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18982 from s2x:fix-property-reflection-values 9d7030bfb5
PiperOrigin-RevId: 701986724
pull/19427/head
parent
5d0865cf15
commit
f1aa92a5f5
2 changed files with 47 additions and 1 deletions
Loading…
Reference in new issue