You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to migrate an application from the PHP Protobuf implementation to the C extension.
And found some inconsistency on the optional behaviour.
With the php implementation optional string values are converted to a empty string ''.
With the C extension a PHP Fatal error is triggered.
PHP Fatal error: Uncaught Exception: Cannot convert '' to string
This is what the setter looks like for a string optional.
The php implementation of GPBUtil::checkString the value is passed as a reference and converted from null to string(0) ""
But the C implementation of GPBUtil::checkString is empty..
So null is never converted to string before assign the message value and triggering the fatal error when the value is converted to_string
What version of protobuf and what language are you using?
Version: main
Language: php
OS: Linux
We are trying to migrate an application from the PHP Protobuf implementation to the C extension.
And found some inconsistency on the optional behaviour.
With the php implementation optional string values are converted to a empty string
''
.With the C extension a PHP Fatal error is triggered.
This is what the setter looks like for a string optional.
The php implementation of GPBUtil::checkString the value is passed as a reference and converted from
null
tostring(0) ""
But the C implementation of GPBUtil::checkString is empty..
So
null
is never converted to string before assign the message value and triggering the fatal error when the value is converted to_stringWhat version of protobuf and what language are you using?
Version: main
Language: php
OS: Linux
What did you do?
What did you expect to see
What did you see instead?
The text was updated successfully, but these errors were encountered: